// CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.
// The only parameter reflects if the entity is "new" to the client, meaning it just came into the client's PVS.
void CSQC_Ent_Update(bool isnew)
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
this.sourceLoc = __FILE__ ":" STR(__LINE__);
int t = ReadByte();
}
// CSQC_Ent_Remove : Called when the server requests a SSQC / CSQC entity to be removed. Essentially call remove(this) as well.
void CSQC_Ent_Remove()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if (autocvar_developer_csqcentities) LOG_INFOF("CSQC_Ent_Remove() with this=%i {.entnum=%d, .enttype=%d}\n", this, this.entnum, this.enttype);
if (wasfreed(this))
{
float vh_notice_time;
void WaypointSprite_Load();
void CSQC_UpdateView(float w, float h)
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
TC(int, w); TC(int, h);
entity e;
float fov;
vector o;
o = this.origin;
if(!move_out_of_solid(this))
- objerror("could not get out of solid at all!");
+ objerror(this, "could not get out of solid at all!");
LOG_INFO("^1NOTE: this map needs FIXING. ", this.classname, " at ", vtos(o - '0 0 1'));
LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(this.origin.x - o.x));
LOG_INFO(" ", ftos(this.origin.y - o.y));
{
this.goalentity = find(world, targetname, this.target);
this.enemy = find(world, targetname, this.target2);
- if(!this.goalentity) { objerror("can not find target\n"); }
- if(!this.enemy) { objerror("can not find target2\n"); }
+ if(!this.goalentity) { objerror(this, "can not find target\n"); }
+ if(!this.enemy) { objerror(this, "can not find target2\n"); }
LOG_DEBUG(strcat(etos(this.goalentity), " linked with ", etos(this.enemy), "\n"));
this.SendFlags |= 3;
if(!g_onslaught) { remove(this); return; }
if (this.target == "" || this.target2 == "")
- objerror("target and target2 must be set\n");
+ objerror(this, "target and target2 must be set\n");
this.ons_worldlinknext = ons_worldlinklist; // link into ons_worldlinklist
ons_worldlinklist = this;
spawnfunc(onslaught_generator)
{
if(!g_onslaught) { remove(this); return; }
- if(!this.team) { objerror("team must be set"); }
+ if(!this.team) { objerror(this, "team must be set"); }
ons_GeneratorSetup(this);
}
.float move_ltime;
.void(entity this) move_think;
.float move_nextthink;
-.void() move_blocked;
+.void(entity this) move_blocked;
.float move_movetype;
.float move_time;
#endif
{
#ifdef SVQC
- SELFPARAM(); // needed for engine functions
+ ENGINE_EVENT();
#endif
PM_Main(this);
}
this.active = ACTIVE_ACTIVE;
// damage when blocked
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
if(this.dmg && (this.message2 == ""))
}
-void button_blocked()
+void button_blocked(entity this)
{
// do nothing, just don't come all the way back out
}
return;
this.effects |= EF_LOWPRECISION;
- this.blocked = button_blocked;
+ setblocked(this, button_blocked);
this.use = button_use;
// if (this.health == 0) // all buttons are now shootable
void door_rotating_go_down(entity this);
void door_rotating_go_up(entity this);
-void door_blocked()
-{SELFPARAM();
+void door_blocked(entity this)
+{
if((this.spawnflags & 8)
#ifdef SVQC
&& (other.takedamage != DAMAGE_NO)
void door_fire(entity this, entity actor, entity trigger)
{
if (this.owner != this)
- objerror ("door_fire: this.owner != this");
+ objerror (this, "door_fire: this.owner != this");
if (this.spawnflags & DOOR_TOGGLE)
{
precache_sound(this.noise);
precache_sound(this.noise3);
- this.blocked = door_blocked;
+ setblocked(this, door_blocked);
this.use = door_use;
if(this.dmg && (this.message == ""))
//this.effects |= EF_LOWPRECISION;
this.classname = "door_rotating";
- this.blocked = door_blocked;
+ setblocked(this, door_blocked);
this.use = door_use;
if(this.spawnflags & 8)
.float door_finished;
-void secret_blocked()
-{SELFPARAM();
+void secret_blocked(entity this)
+{
if (time < this.door_finished)
return;
this.door_finished = time + 0.5;
precache_sound(this.noise);
settouch(this, secret_touch);
- this.blocked = secret_blocked;
+ setblocked(this, secret_blocked);
this.speed = 50;
this.use = fd_secret_use;
IFTARGETED
this.destvec = this.origin;
this.cnt = 360 / this.speed;
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
if(this.dmg && (this.message2 == ""))
this.dmgtime = 0.25;
this.dmgtime2 = time;
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
this.avelocity_z = 0.0000001;
if (!InitMovingBrushTrigger(this))
this.effects |= EF_LOWPRECISION;
setsize (this, this.mins , this.maxs);
- this.blocked = plat_crush;
+ setblocked(this, plat_crush);
if (!this.speed) this.speed = 150;
if (!this.lip) this.lip = 16;
return;
// no EF_LOWPRECISION here, as rounding angles is bad
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
// wait for targets to spawn
this.SUB_NEXTTHINK = this.SUB_LTIME + 999999999;
}
}
if (this.target == "")
- objerror("train_next: no next target");
+ objerror(this, "train_next: no next target");
this.wait = targ.wait;
if (!this.wait)
this.wait = 0.1;
targ = find(world, targetname, this.target);
this.target = targ.target;
if (this.target == "")
- objerror("func_train_find: no next target");
+ objerror(this, "func_train_find: no next target");
SUB_SETORIGIN(this, targ.origin - this.view_ofs);
if(!(this.spawnflags & 4))
precache_sound(this.noise);
if (this.target == "")
- objerror("func_train without a target");
+ objerror(this, "func_train without a target");
if (!this.speed)
this.speed = 100;
// wait for targets to spawn
InitializeEntity(this, func_train_find, INITPRIO_FINDTARGET);
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
if(this.dmg && (this.message2 == ""))
this.wp03 = find(world, targetname, this.target4);
if(!this.wp00 && !this.wp01 && !this.wp02 && !this.wp03)
- objerror("No reference entity found, so there is nothing to move. Aborting.");
+ objerror(this, "No reference entity found, so there is nothing to move. Aborting.");
this.destvec = this.origin - func_vectormamamam_origin(this, 0);
if(vlen(this.target4normal))
this.target4normal = normalize(this.target4normal);
- this.blocked = generic_plat_blocked;
+ setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
if(this.dmg && (this.message == ""))
if(!src && !dst)
{
- objerror("follow: could not find target/killtarget");
+ objerror(this, "follow: could not find target/killtarget");
return;
}
}
else if(!src || !dst)
{
- objerror("follow: could not find target/killtarget");
+ objerror(this, "follow: could not find target/killtarget");
return;
}
else if(this.spawnflags & 1)
{
}
else
- objerror ("^3Teleport destination without a targetname");
+ objerror (this, "^3Teleport destination without a targetname");
teleport_dest_link(this);
}
-void generic_plat_blocked()
+void generic_plat_blocked(entity this)
{
#ifdef SVQC
- SELFPARAM();
if(this.dmg && other.takedamage != DAMAGE_NO)
{
if(this.dmgtime2 < time)
// otherwise, something is fishy...
remove(trigger);
- objerror("plat_spawn_inside_trigger: platform has odd size or lip, can't spawn");
+ objerror(this, "plat_spawn_inside_trigger: platform has odd size or lip, can't spawn");
}
void plat_hit_top(entity this)
}
-void plat_crush()
-{SELFPARAM();
+void plat_crush(entity this)
+{
if((this.spawnflags & 4) && (other.takedamage != DAMAGE_NO))
{ // KIll Kill Kill!!
#ifdef SVQC
{
this.use = func_null;
if (this.state != 4)
- objerror ("plat_use: not in up state");
+ objerror (this, "plat_use: not in up state");
plat_go_down(this);
}
if(!cubic_speedfunc_is_sane(e.platmovetype_start, e.platmovetype_end))
{
- objerror("Invalid platform move type; platform would go in reverse, which is not allowed.");
+ objerror(e, "Invalid platform move type; platform would go in reverse, which is not allowed.");
return false;
}
void plat_trigger_use(entity this, entity actor, entity trigger);
void plat_go_up(entity this);
void plat_go_down(entity this);
-void plat_crush();
+void plat_crush(entity this);
const float PLAT_LOW_TRIGGER = 1;
.float dmg;
entity controller;
if (!tspeed)
- objerror ("No speed is defined!");
+ objerror (this, "No speed is defined!");
this.think1 = func;
this.finaldest = tdest;
float traveltime;
if (!tspeed)
- objerror ("No speed is defined!");
+ objerror (this, "No speed is defined!");
this.think1 = func;
this.finaldest = tdest;
float traveltime;
if (!tspeed)
- objerror ("No speed is defined!");
+ objerror (this, "No speed is defined!");
// take the shortest distance for the angles
this.angles_x -= 360 * floor((this.angles_x - destangle_x) / 360 + 0.5);
}
else if(this.spawnflags & 2) // LOOPED_OFF
{
- objerror("This sound entity can never be activated");
+ objerror(this, "This sound entity can never be activated");
}
else
{
if(n == 0)
{
// no dest!
- objerror ("Teleporter with nonexistant target");
+ objerror (this, "Teleporter with nonexistant target");
return;
}
else if(n == 1)
targ = find(world, targetname, this.target);
if(!targ)
{
- objerror("trigger_force without a (valid) .target!\n");
+ objerror(this, "trigger_force without a (valid) .target!\n");
remove(this);
return;
}
{
// no dest!
#ifdef SVQC
- objerror ("Jumppad with nonexistant target");
+ objerror (this, "Jumppad with nonexistant target");
#endif
return;
}
if (this.health)
{
if (this.spawnflags & SPAWNFLAG_NOTOUCH)
- objerror ("health and notouch don't make sense\n");
+ objerror (this, "health and notouch don't make sense\n");
this.max_health = this.health;
this.event_damage = multi_eventdamage;
this.takedamage = DAMAGE_YES;
if (this.target == "")
{
- objerror ("Teleporter with no target");
+ objerror (this, "Teleporter with no target");
return;
}
void trigger_link(entity this, bool(entity this, entity to, int sendflags) sendfunc)
{
- this.SendEntity = SendEntity_self;
- this.SendEntity3 = sendfunc;
+ setSendEntity(this, sendfunc);
this.SendFlags = 0xFFFFFF;
}
{
if(this.realowner == world)
{
- objerror("Cannot succeed successfully: no owner\n");
+ objerror(this, "Cannot succeed successfully: no owner\n");
return;
}
{
if(this.realowner == world)
{
- objerror("Cannot fail successfully: no owner\n");
+ objerror(this, "Cannot fail successfully: no owner\n");
return;
}
--- /dev/null
+#pragma once
+
+#undef objerror
--- /dev/null
+#pragma once
+
+#define objerror builtin_objerror
#define bool float
#endif
+#include <dpdefs/pre.qh>
+
#if defined(CSQC)
#include <dpdefs/csprogsdefs.qh>
#include <dpdefs/keycodes.qh>
#include <dpdefs/keycodes.qh>
#endif
+#include <dpdefs/post.qh>
+
#define USING(name, T) typedef T name
#include "bool.qh"
void CSQCModel_LinkEntity(entity e)
{
- e.SendEntity = SendEntity_self;
- e.SendEntity3 = CSQCModel_Send;
+ setSendEntity(e, CSQCModel_Send);
e.SendFlags = 0xFFFFFF;
CSQCModel_CheckUpdate(e);
}
/** return false to remove from the client */
.bool(entity this, entity to, int sendflags) SendEntity3;
- bool SendEntity_self(entity to, int sendflags) { SELFPARAM(); return this.SendEntity3(this, to, sendflags); }
-
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
{
if (e.classname == "") e.classname = "net_linked";
setsize(e, mi, ma);
}
- e.SendEntity = SendEntity_self;
- e.SendEntity3 = sendfunc;
+ setSendEntity(e, sendfunc);
e.SendFlags = 0xFFFFFF;
if (!docull) e.effects |= EF_NODEPTHTEST;
#define self (this, self)
#undef SELFPARAM
#define SELFPARAM() const entity this = __self
+ #define ENGINE_EVENT() const entity this = __self
#endif
// Step 4: kill unstructured setself
#endif
// Step 6: remove SELFPARAM, add parameters
-#if 0
+#if 1
#undef SELFPARAM
#endif
#define WITHSELF(value, block) block
#endif
-#define SELFWRAP(T, R, args, forward) \
- .R() T; \
- .R() __##T = T; \
+#define SELFWRAP(T, R, oldargs, args, forward) \
+ .R oldargs T; \
+ .R oldargs __##T = T; \
.R args self##T; \
- R T##_self() { SELFPARAM(); return this.self##T forward; }
+ R T##_self oldargs { ENGINE_EVENT(); return this.self##T forward; }
noref entity _selftemp;
#define SELFWRAP_SET(T, e, f) \
#define _SELFWRAP_GET(T, e) \
(0, (e).__##T)
-SELFWRAP(think, void, (entity this), (this))
+SELFWRAP(think, void, (), (entity this), (this))
#define setthink(e, f) SELFWRAP_SET(think, e, f)
#define getthink(e) SELFWRAP_GET(think, e)
-SELFWRAP(touch, void, (entity this), (this))
+SELFWRAP(touch, void, (), (entity this), (this))
#define settouch(e, f) SELFWRAP_SET(touch, e, f)
#define gettouch(e) SELFWRAP_GET(touch, e)
-SELFWRAP(predraw, void, (entity this), (this))
+SELFWRAP(blocked, void, (), (entity this), (this))
+#define setblocked(e, f) SELFWRAP_SET(blocked, e, f)
+#define blocked stopusingthis
+
+SELFWRAP(predraw, void, (), (entity this), (this))
#define setpredraw(e, f) SELFWRAP_SET(predraw, e, f)
-SELFWRAP(customizeentityforclient, bool, (entity this), (this))
+SELFWRAP(customizeentityforclient, bool, (), (entity this), (this))
#define setcefc(e, f) SELFWRAP_SET(customizeentityforclient, e, f)
#define getcefc(e) SELFWRAP_GET(customizeentityforclient, e)
+SELFWRAP(camera_transform, vector, (vector org, vector ang), (entity this, vector org, vector ang), (this, org, ang))
+#define setcamera_transform(e, f) SELFWRAP_SET(camera_transform, e, f)
+
+SELFWRAP(SendEntity, bool, (entity to, int sendflags), (entity this, entity to, int sendflags), (this, to, sendflags))
+#define setSendEntity(e, f) SELFWRAP_SET(SendEntity, e, f)
+
+#ifdef SVQC
+void make_safe_for_remove(entity this);
+#endif
+
+void objerror(entity this, string s)
+{
+#ifdef SVQC
+ make_safe_for_remove(this);
+#endif
+ WITHSELF(this, builtin_objerror(s));
+}
+
#ifndef MENUQC
void adaptor_think2touch(entity this) { WITH(entity, other, NULL, gettouch(this)(this)); }
void adaptor_think2use(entity this) { if (this.use) this.use(this, NULL, NULL); }
WarpZone_Accumulator_AddInverseTransform(acc, wz.warpzone_transform, wz.warpzone_shift);
}
-.vector(vector, vector) camera_transform;
float autocvar_cl_warpzone_usetrace = 1;
-vector WarpZone_camera_transform(vector org, vector ang)
-{SELFPARAM();
+vector WarpZone_camera_transform(entity this, vector org, vector ang)
+{
vector vf, vr, vu;
if(this.warpzone_fadestart)
if(vdist(org - this.origin - 0.5 * (this.mins + this.maxs), >, this.warpzone_fadeend + 400))
e.warpzone_targetangles = other_ang;
fixedmakevectors(my_ang); e.warpzone_forward = v_forward;
fixedmakevectors(other_ang); e.warpzone_targetforward = v_forward;
- e.camera_transform = WarpZone_camera_transform;
+ setcamera_transform(e, WarpZone_camera_transform);
}
-vector WarpZone_Camera_camera_transform(vector org, vector ang)
-{SELFPARAM();
+vector WarpZone_Camera_camera_transform(entity this, vector org, vector ang)
+{
// a fixed camera view
if(this.warpzone_fadestart)
if(vdist(org - this.origin - 0.5 * (this.mins + this.maxs), >, this.warpzone_fadeend + 400))
{
e.warpzone_origin = my_org;
e.warpzone_angles = my_ang;
- e.camera_transform = WarpZone_Camera_camera_transform;
+ setcamera_transform(e, WarpZone_Camera_camera_transform);
}
.entity enemy;
entity ts = new(warpzone_teleported);
setmodel(ts, MDL_Null);
- ts.SendEntity = SendEntity_self;
- ts.SendEntity3 = WarpZone_Teleported_Send;
+ setSendEntity(ts, WarpZone_Teleported_Send);
ts.SendFlags = 0xFFFFFF;
ts.drawonlytoclient = player;
setthink(ts, SUB_Remove);
setsize(this, this.mins * this.scale, this.maxs * this.scale);
else
setsize(this, this.mins, this.maxs);
- this.SendEntity = SendEntity_self;
- this.SendEntity3 = WarpZone_Send;
+ setSendEntity(this, WarpZone_Send);
this.SendFlags = 0xFFFFFF;
BITSET_ASSIGN(this.effects, EF_NODEPTHTEST);
this.warpzone_next = warpzone_first;
this.solid = SOLID_BSP;
else if(this.solid < 0)
this.solid = SOLID_NOT;
- this.SendEntity = SendEntity_self;
- this.SendEntity3 = WarpZone_Camera_Send;
+ setSendEntity(this, WarpZone_Camera_Send);
this.SendFlags = 0xFFFFFF;
this.warpzone_next = warpzone_camera_first;
warpzone_camera_first = this;
e = find(world, targetname, this.target);
if(!e)
{
- objerror("Missing target. FAIL!");
+ objerror(this, "Missing target. FAIL!");
return;
}
vector a = vectoangles(e.origin - this.origin);
{
if(++num_autoscreenshot > autocvar_g_max_info_autoscreenshot)
{
- objerror("Too many info_autoscreenshot entitites. FAIL!");
+ objerror(this, "Too many info_autoscreenshot entitites. FAIL!");
return;
}
if(this.target != "")
/** Called when a client spawns in the server */
void PutClientInServer()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if (IS_BOT_CLIENT(this)) {
TRANSMUTE(Player, this);
} else if (IS_REAL_CLIENT(this)) {
=============
*/
void SetChangeParms ()
-{SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
// save parms for level change
parm1 = this.parm_idlesince - time;
}
void ClientKill ()
-{SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if(gameover) return;
if(this.player_blocked) return;
if(STAT(FROZEN, this)) return;
=============
*/
void ClientPreConnect ()
-{SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if(autocvar_sv_eventlog)
{
GameLogEcho(sprintf(":connect:%d:%d:%s",
=============
*/
void ClientConnect()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if (Ban_MaybeEnforceBanOnce(this)) return;
assert(!IS_CLIENT(this), return);
this.flags |= FL_CLIENT;
.entity chatbubbleentity;
void ReadyCount();
void ClientDisconnect()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
assert(IS_CLIENT(this), return);
PlayerStats_GameReport_FinalizePlayer(this);
.float last_vehiclecheck;
.int items_added;
void PlayerPreThink ()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
WarpZone_PlayerPhysics_FixVAngle(this);
STAT(GAMESTARTTIME, this) = game_starttime;
*/
.float idlekick_lasttimeleft;
void PlayerPostThink ()
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
if (sv_maxidle > 0)
if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
if (IS_REAL_CLIENT(this))
// If this function exists, server game code parses clientcommand before the engine code gets it.
void SV_ParseClientCommand(string command)
-{
- SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
// If invalid UTF-8, don't even parse it
string command2 = "";
float len = strlen(command);
{
entity targ;
if (!this.target)
- objerror ("dynlight: no target to follow");
+ objerror (this, "dynlight: no target to follow");
targ = find(world, targetname, this.target);
this.movetype = MOVETYPE_FOLLOW;
{
entity targ;
if (!this.target)
- objerror ("dynlight: no target to follow");
+ objerror (this, "dynlight: no target to follow");
targ = find(world, targetname, this.target);
this.target = targ.target;
{
entity targ;
if (!this.target)
- objerror ("dynlight: no target to follow");
+ objerror (this, "dynlight: no target to follow");
targ = find(world, targetname, this.target);
setattachment(this, targ, this.dtagname);
this.movetype = MOVETYPE_PUSH;
if(this.modelindex == 0)
{
- objerror("InitMovingBrushTrigger: no brushes found!");
+ objerror(this, "InitMovingBrushTrigger: no brushes found!");
return false;
}
return true;
// reject this entity if more than one key was set!
if (this.itemkeys>0 && (this.itemkeys & (this.itemkeys-1)) != 0) {
- objerror("item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
+ objerror(this, "item_key.itemkeys must contain only 1 bit set specifying the key it represents!");
remove(this);
return;
}
_colormod = '1 1 1';
if (this.netname == "") {
- objerror("item_key doesn't have a default name for this key and a custom one was not specified!");
+ objerror(this, "item_key doesn't have a default name for this key and a custom one was not specified!");
remove(this);
return;
}
} else if (this.itemkeys >= ITEM_KEY_BIT(3) && this.itemkeys <= ITEM_KEY_BIT(5)) {
_model = "models/keys/key.md3"; // FIXME: replace it by a keycard model!
} else if (this.model == "") {
- objerror("item_key doesn't have a default model for this key and a custom one was not specified!");
+ objerror(this, "item_key doesn't have a default model for this key and a custom one was not specified!");
remove(this);
return;
}
}
}
-void objerror(string s)
-{SELFPARAM(); // needed for engine functions
- make_safe_for_remove(this);
- builtin_objerror(s);
-}
-
.float remove_except_protected_forbidden;
void remove_except_protected(entity e)
{
void stopsoundto(float _dest, entity e, float chan);
void soundtoat(float _dest, entity e, vector o, float chan, string samp, float vol, float _atten);
-void objerror(string s);
void droptofloor(entity this);
void attach_sameorigin(entity e, entity to, string tag);
if(this.enemy == world)
this.enemy = objective;
else
- objerror("more than one objective as target - fix the map!");
+ objerror(this, "more than one objective as target - fix the map!");
break;
}
}
if(this.enemy == world)
- objerror("no objective as target - fix the map!");
+ objerror(this, "no objective as target - fix the map!");
}
bool assault_decreaser_sprite_visible(entity this, entity player, entity view)
while(head && head.netname != "")
head = find(head, classname, "dom_team");
if (!head)
- objerror("no spawnfunc_dom_team with netname \"\" found\n");
+ objerror(this, "no spawnfunc_dom_team with netname \"\" found\n");
// copy important properties from spawnfunc_dom_team entity
this.goalentity = head;
this.mins = PL_MIN_CONST;
this.maxs = PL_MAX_CONST;
if (!move_out_of_solid(this))
- objerror("could not get out of solid at all!");
+ objerror(this, "could not get out of solid at all!");
LOG_INFO("^1NOTE: this map needs FIXING. Spawnpoint at ", vtos(o - '0 0 1'));
LOG_INFO(" needs to be moved out of solid, e.g. by '", ftos(this.origin.x - o.x));
LOG_INFO(" ", ftos(this.origin.y - o.y));
{
setorigin(this, o);
this.mins = this.maxs = '0 0 0';
- objerror("player spawn point in solid, mapper sucks!\n");
+ objerror(this, "player spawn point in solid, mapper sucks!\n");
return;
}
}
.string cvarfilter;
bool DoesQ3ARemoveThisEntity(entity this);
void SV_OnEntityPreSpawnFunction()
-{SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
__spawnfunc_expect = this;
if (this)
if (this.gametypefilter != "")
#pragma once
-#undef objerror
#undef droptofloor
#undef sound
#undef remove
#pragma once
-#define objerror builtin_objerror
#define droptofloor builtin_droptofloor
#define remove builtin_remove
#define cvar_set builtin_cvar_set
//void() ctf_playerchanged;
void SV_ChangeTeam(float _color)
-{SELFPARAM(); // needed for engine functions
+{ENGINE_EVENT();
float scolor, dcolor, steam, dteam; //, dbotcount, scount, dcount;
// in normal deathmatch we can just apply the color and we're done