Remove various SELFPARAM
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 28 May 2016 11:06:01 +0000 (21:06 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 28 May 2016 11:06:01 +0000 (21:06 +1000)
41 files changed:
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/monsters/monster/shambler.qc
qcsrc/common/monsters/monster/spider.qc
qcsrc/common/monsters/monster/wyvern.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/mutators/mutator/overkill/rpc.qc
qcsrc/common/t_items.qc
qcsrc/common/t_items.qh
qcsrc/common/turrets/sv_turrets.qc
qcsrc/common/turrets/turret/ewheel.qc
qcsrc/common/turrets/turret/walker.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/vehicles/vehicle/raptor_weapons.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/blaster.qc
qcsrc/common/weapons/weapon/crylink.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hlac.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/minelayer.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/lib/csqcmodel/sv_model.qc
qcsrc/lib/warpzone/server.qc
qcsrc/lib/warpzone/server.qh
qcsrc/server/bot/havocbot/havocbot.qc
qcsrc/server/bot/havocbot/havocbot.qh
qcsrc/server/command/common.qc
qcsrc/server/command/common.qh
qcsrc/server/g_hook.qc
qcsrc/server/miscfunctions.qh
qcsrc/server/pathlib/debug.qc
qcsrc/server/pathlib/main.qc

index f969985..e00bddd 100644 (file)
@@ -1360,7 +1360,8 @@ int lasthud;
 float vh_notice_time;
 void WaypointSprite_Load();
 void CSQC_UpdateView(float w, float h)
-{SELFPARAM();
+{
+    SELFPARAM();
     TC(int, w); TC(int, h);
        entity e;
        float fov;
index afa6db9..cb9e3f1 100644 (file)
@@ -725,7 +725,7 @@ void W_Nexball_Touch(entity this)
        //self.think = func_null;
        //self.enemy = world;
 
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        if(attacker.team != other.team || autocvar_g_nexball_basketball_teamsteal)
                if((ball = other.ballcarried) && !STAT(FROZEN, other) && !IS_DEAD(other) && (IS_PLAYER(attacker)))
                {
index 50e9061..5b7bf3a 100644 (file)
@@ -162,7 +162,7 @@ void M_Mage_Attack_Spike_Explode(entity this)
 
 void M_Mage_Attack_Spike_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        M_Mage_Attack_Spike_Explode(self);
 }
index c2e1388..2e9384d 100644 (file)
@@ -126,7 +126,7 @@ void M_Shambler_Attack_Lightning_Damage(entity this, entity inflictor, entity at
 
 void M_Shambler_Attack_Lightning_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        self.use(this, NULL, NULL);
 }
index 281accb..b9f9bfc 100644 (file)
@@ -158,7 +158,7 @@ void M_Spider_Attack_Web_Explode_use(entity this, entity actor, entity trigger)
 
 void M_Spider_Attack_Web_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        M_Spider_Attack_Web_Explode();
 }
index a0e6705..ae8e875 100644 (file)
@@ -118,7 +118,7 @@ void M_Wyvern_Attack_Fireball_Explode(entity this)
 
 void M_Wyvern_Attack_Fireball_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        M_Wyvern_Attack_Fireball_Explode(this);
 }
index a6a2f72..4e339ce 100644 (file)
@@ -724,7 +724,7 @@ void nade_touch(entity this)
                return;
        }
 
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        //setsize(self, '-2 -2 -2', '2 2 2');
        //UpdateCSQCProjectile(self);
index 1458172..b3b8f42 100644 (file)
@@ -62,8 +62,8 @@ void W_RocketPropelledChainsaw_Explode(entity this)
 
 void W_RocketPropelledChainsaw_Touch (entity this)
 {
-       if(WarpZone_Projectile_Touch())
-               if(wasfreed(self))
+       if(WarpZone_Projectile_Touch(this))
+               if(wasfreed(this))
                        return;
 
        W_RocketPropelledChainsaw_Explode(this);
index 60ee6c8..656d829 100644 (file)
@@ -484,8 +484,8 @@ float Item_ItemsTime_UpdateTime(entity e, float t);
 void Item_ItemsTime_SetTime(entity e, float t);
 void Item_ItemsTime_SetTimesForAllPlayers();
 
-void Item_Respawn ()
-{SELFPARAM();
+void Item_Respawn (entity this)
+{
        Item_Show(self, 1);
        // this is ugly...
        if(self.items == ITEM_Strength.m_itemid)
@@ -516,7 +516,7 @@ void Item_RespawnCountdown (entity this)
        {
                if(self.waypointsprite_attached)
                        WaypointSprite_Kill(self.waypointsprite_attached);
-               Item_Respawn();
+               Item_Respawn(self);
        }
        else
        {
@@ -575,7 +575,7 @@ void Item_RespawnThink(entity this)
                ItemUpdate(self);
 
        if(time >= self.wait)
-               Item_Respawn();
+               Item_Respawn(self);
 }
 
 void Item_ScheduleRespawnIn(entity e, float t)
@@ -858,7 +858,6 @@ void Item_Reset(entity this)
                        Item_ScheduleInitialRespawn(this);
        }
 }
-void Item_Reset_self() { SELFPARAM(); Item_Reset(this); }
 
 void Item_FindTeam(entity this)
 {
@@ -1634,7 +1633,7 @@ void GiveRot(entity e, float v0, float v1, .float rotfield, float rottime, .floa
                e.(regenfield) = max(e.(regenfield), time + regentime);
 }
 float GiveItems(entity e, float beginarg, float endarg)
-{SELFPARAM();
+{
        float got, i, val, op;
        float _switchweapon;
        string cmd;
@@ -1796,7 +1795,7 @@ float GiveItems(entity e, float beginarg, float endarg)
        POSTGIVE_VALUE_ROT(e, health, 1, pauserothealth_finished, autocvar_g_balance_pause_health_rot, pauseregen_finished, autocvar_g_balance_pause_health_regen, SND_MEGAHEALTH, SND_Null);
 
        if(e.superweapons_finished <= 0)
-               if(self.weapons & WEPSET_SUPERWEAPONS)
+               if(e.weapons & WEPSET_SUPERWEAPONS)
                        e.superweapons_finished = autocvar_g_balance_superweapons_time;
 
        if(e.strength_finished <= 0)
index 3ba0a0d..5ebc9d7 100644 (file)
@@ -72,7 +72,7 @@ const float ITEM_RESPAWN_TICKS = 10;
 
 void Item_Show (entity e, float mode);
 
-void Item_Respawn ();
+void Item_Respawn (entity this);
 
 void Item_RespawnCountdown(entity this);
 void Item_ScheduleRespawnIn(entity e, float t);
index 66b3f3d..769c0ed 100644 (file)
@@ -445,7 +445,7 @@ void turret_projectile_explode(entity this)
 
 void turret_projectile_touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        turret_projectile_explode(this);
 }
 
index 40603cc..1134310 100644 (file)
@@ -54,7 +54,7 @@ void ewheel_move_path()
 
                 if (self.pathgoal.enemy)
                 {
-                    self.pathcurrent = pathlib_astar(self.pathgoal.origin,self.pathgoal.enemy.origin);
+                    self.pathcurrent = pathlib_astar(self, self.pathgoal.origin,self.pathgoal.enemy.origin);
                     self.pathgoal = self.pathgoal.enemy;
                 }
             }
@@ -207,7 +207,7 @@ METHOD(EWheel, tr_setup, void(EWheel this, entity it))
             {
 
 #ifdef EWHEEL_FANCYPATH
-                it.pathcurrent = WALKER_PATH(it.origin,e.origin);
+                it.pathcurrent = WALKER_PATH(it, it.origin, e.origin);
                 it.pathgoal = e;
 #else
                 it.pathcurrent  = e;
index de7d282..fec4060 100644 (file)
@@ -63,7 +63,7 @@ const int ANIM_ROAM       = 11;
 .float animflag;
 .float idletime;
 
-#define WALKER_PATH(s,e) pathlib_astar(s,e)
+#define WALKER_PATH(this, s, e) pathlib_astar(this, s, e)
 
 float walker_firecheck()
 {SELFPARAM();
@@ -317,7 +317,7 @@ void walker_move_path()
 
                 if (self.pathgoal.enemy)
                 {
-                    self.pathcurrent = WALKER_PATH(self.pathgoal.origin,self.pathgoal.enemy.origin);
+                    self.pathcurrent = WALKER_PATH(self, self.pathgoal.origin, self.pathgoal.enemy.origin);
                     self.pathgoal = self.pathgoal.enemy;
                 }
             }
@@ -617,7 +617,7 @@ METHOD(WalkerTurret, tr_setup, void(WalkerTurret this, entity it))
         else
         {
 #ifdef WALKER_FANCYPATHING
-            it.pathcurrent = WALKER_PATH(it.origin, e.origin);
+            it.pathcurrent = WALKER_PATH(it, it.origin, e.origin);
             it.pathgoal = e;
 #else
             it.pathcurrent = e;
index ec643fc..5211013 100644 (file)
@@ -57,22 +57,25 @@ string wordwrap(string s, float l)
 
 #ifndef MENUQC
 #ifndef CSQC
+entity _wordwrap_buffer_sprint_ent;
 void wordwrap_buffer_sprint(string s)
-{SELFPARAM();
+{
        wordwrap_buffer = strcat(wordwrap_buffer, s);
        if(s == "\n")
        {
-               sprint(self, wordwrap_buffer);
+               sprint(_wordwrap_buffer_sprint_ent, wordwrap_buffer);
                wordwrap_buffer = "";
        }
 }
 
-void wordwrap_sprint(string s, float l)
-{SELFPARAM();
+void wordwrap_sprint(entity to, string s, float l)
+{
        wordwrap_buffer = "";
+       _wordwrap_buffer_sprint_ent = to;
        wordwrap_cb(s, l, wordwrap_buffer_sprint);
+       _wordwrap_buffer_sprint_ent = NULL;
        if(wordwrap_buffer != "")
-               sprint(self, strcat(wordwrap_buffer, "\n"));
+               sprint(to, strcat(wordwrap_buffer, "\n"));
        wordwrap_buffer = "";
        return;
 }
index 066033a..fa17a06 100644 (file)
@@ -11,7 +11,7 @@ vector real_origin(entity ent);
 string wordwrap(string s, float l);
 #ifndef MENUQC
 #ifndef CSQC
-void wordwrap_sprint(string s, float l);
+void wordwrap_sprint(entity to, string s, float l);
 #endif
 #endif
 void wordwrap_cb(string s, float l, void(string) callback);
index 19b71a0..6f1d2d9 100644 (file)
@@ -224,7 +224,7 @@ void vehicles_projectile_explode(entity this)
                        return;
        }
 
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        self.event_damage = func_null;
        RadiusDamage (self, self.realowner, self.shot_dmg, 0, self.shot_radius, self, world, self.shot_force, self.totalfrags, other);
index c2c266f..fc43973 100644 (file)
@@ -99,7 +99,7 @@ void raptor_bomblet_touch(entity this)
     if(other == self.owner)
         return;
 
-    PROJECTILE_TOUCH;
+    PROJECTILE_TOUCH(this);
     setthink(self, raptor_bomblet_boom);
     self.nextthink = time + random() * autocvar_g_vehicle_raptor_bomblet_explode_delay;
 }
index e2936bd..5df635f 100644 (file)
@@ -261,7 +261,7 @@ void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float dam
 
 void W_Arc_Bolt_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        self.use(this, NULL, NULL);
 }
 
index 5b583c1..394d50c 100644 (file)
@@ -58,7 +58,7 @@ spawnfunc(weapon_laser) { spawnfunc_weapon_blaster(this); }
 
 void W_Blaster_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        self.event_damage = func_null;
 
index fb24bcf..a582f98 100644 (file)
@@ -298,7 +298,7 @@ void W_Crylink_Touch(entity this)
        float finalhit;
        float f;
        float isprimary = !(self.projectiledeathtype & HITTYPE_SECONDARY);
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        float a;
        a = bound(0, 1 - (time - self.fade_time) * self.fade_rate, 1);
index e04f812..772b9ea 100644 (file)
@@ -322,13 +322,13 @@ void W_Devastator_Think(entity this)
 
 void W_Devastator_Touch(entity this)
 {
-       if(WarpZone_Projectile_Touch())
+       if(WarpZone_Projectile_Touch(this))
        {
-               if(wasfreed(self))
-                       W_Devastator_Unregister(self);
+               if(wasfreed(this))
+                       W_Devastator_Unregister(this);
                return;
        }
-       W_Devastator_Unregister(self);
+       W_Devastator_Unregister(this);
        W_Devastator_Explode(this);
 }
 
index 37dcf9f..64a5e06 100644 (file)
@@ -198,7 +198,7 @@ void W_Electro_Explode_use(entity this, entity actor, entity trigger)
 
 void W_Electro_TouchExplode(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        W_Electro_Explode(this);
 }
 
@@ -300,7 +300,7 @@ void W_Electro_Attack_Bolt(Weapon thiswep, entity actor)
 
 void W_Electro_Orb_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        if(other.takedamage == DAMAGE_AIM)
                { if(WEP_CVAR_SEC(electro, touchexplode)) { W_Electro_Explode(self); } }
        else
index 10a26e4..3ee23e8 100644 (file)
@@ -119,7 +119,7 @@ void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
 
 void W_Fireball_TouchExplode(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        W_Fireball_Explode(this);
 }
 
@@ -292,7 +292,7 @@ void W_Fireball_Firemine_Think(entity this)
 
 void W_Fireball_Firemine_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        if(other.takedamage == DAMAGE_AIM)
        if(Fire_AddDamage(other, self.realowner, WEP_CVAR_SEC(fireball, damage), WEP_CVAR_SEC(fireball, damagetime), self.projectiledeathtype) >= 0)
        {
index e2274fa..577d4cf 100644 (file)
@@ -115,13 +115,13 @@ void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage
 
 void W_Hagar_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        this.use(this, NULL, NULL);
 }
 
 void W_Hagar_Touch2(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        if(self.cnt > 0 || other.takedamage == DAMAGE_AIM) {
                this.use(this, NULL, NULL);
index 928462a..3fa50ff 100644 (file)
@@ -58,7 +58,7 @@ void W_HLAC_Touch(entity this)
 {
        float isprimary;
 
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        self.event_damage = func_null;
 
index 40f828f..7c4aabf 100644 (file)
@@ -139,7 +139,7 @@ void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage,
 
 void W_Hook_Touch2(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        this.use(this, NULL, NULL);
 }
 
index ecb5059..bc7f8eb 100644 (file)
@@ -273,7 +273,7 @@ void W_MineLayer_Touch(entity this)
        if(self.movetype == MOVETYPE_NONE || self.movetype == MOVETYPE_FOLLOW)
                return; // we're already a stuck mine, why do we get called? TODO does this even happen?
 
-       if(WarpZone_Projectile_Touch())
+       if(WarpZone_Projectile_Touch(self))
        {
                if(wasfreed(self))
                        self.realowner.minelayer_mines -= 1;
index ddff4a3..843eaa8 100644 (file)
@@ -144,7 +144,7 @@ void W_Mortar_Grenade_Think1(entity this)
 
 void W_Mortar_Grenade_Touch1(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_PRI(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
                this.use(this, NULL, NULL);
@@ -176,7 +176,7 @@ void W_Mortar_Grenade_Touch1(entity this)
 
 void W_Mortar_Grenade_Touch2(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        if(other.takedamage == DAMAGE_AIM || WEP_CVAR_SEC(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
        {
                this.use(this, NULL, NULL);
index 5af8405..0852555 100644 (file)
@@ -104,7 +104,7 @@ void W_Seeker_Missile_Explode(entity this)
 
 void W_Seeker_Missile_Touch(entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        W_Seeker_Missile_Explode(this);
 }
@@ -498,7 +498,7 @@ void W_Seeker_Tag_Touch(entity this)
        vector org2;
        entity e;
 
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        dir     = normalize(self.realowner.origin - self.origin);
        org2    = findbetterlocation(self.origin, 8);
index 4fd81eb..c4672e7 100644 (file)
@@ -234,7 +234,7 @@ void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
 
 void W_RocketMinsta_Laser_Touch (entity this)
 {
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
        //W_RocketMinsta_Laser_Explode ();
        RadiusDamage (self, self.realowner, self.rm_damage, self.rm_edmg, autocvar_g_rm_laser_radius, world, world, self.rm_force, self.projectiledeathtype, other);
        remove(self);
index dc2e402..b02df19 100644 (file)
@@ -30,9 +30,8 @@
 
 // generic CSQC model code
 
-bool CSQCModel_Send(entity to, int sf)
+bool CSQCModel_Send(entity this, entity to, int sf)
 {
-    SELFPARAM();
        // some nice flags for CSQCMODEL_IF
        noref bool isplayer = IS_CLIENT(this);
        noref bool islocalplayer = (this == to);
@@ -122,7 +121,8 @@ void CSQCModel_CheckUpdate(entity e)
 
 void CSQCModel_LinkEntity(entity e)
 {
-       e.SendEntity = CSQCModel_Send;
+       e.SendEntity = SendEntity_self;
+       e.SendEntity3 = CSQCModel_Send;
        e.SendFlags = 0xFFFFFF;
        CSQCModel_CheckUpdate(e);
 }
@@ -130,4 +130,5 @@ void CSQCModel_LinkEntity(entity e)
 void CSQCModel_UnlinkEntity(entity e)
 {
        e.SendEntity = func_null;
+       e.SendEntity3 = func_null;
 }
index c8a241f..0fb8dd2 100644 (file)
@@ -363,7 +363,7 @@ bool WarpZone_Camera_Send(entity this, entity to, int sendflags)
 
 #ifdef WARPZONELIB_KEEPDEBUG
 float WarpZone_CheckProjectileImpact(entity player)
-{SELFPARAM();
+{
        vector o0, v0;
 
        .vector orgvec, velvec;
@@ -435,8 +435,8 @@ float WarpZone_CheckProjectileImpact(entity player)
 #endif
 #endif
 
-float WarpZone_Projectile_Touch()
-{SELFPARAM();
+float WarpZone_Projectile_Touch(entity this)
+{
        if(other.classname == "trigger_warpzone")
                return true;
 
@@ -479,9 +479,8 @@ float WarpZone_Projectile_Touch()
                save_ent = trace_ent;
                save_inopen = trace_inopen;
                save_inwater = trace_inwater;
-               float f;
-               if((f = WarpZone_CheckProjectileImpact(this)) != 0)
-                       return (f > 0);
+               float f = WarpZone_CheckProjectileImpact(this);
+               if (f) return (f > 0);
                trace_dpstartcontents = save_dpstartcontents;
                trace_dphitcontents = save_dphitcontents;
                trace_dphitq3surfaceflags = save_dphitq3surfaceflags;
index db0ba59..c6c7b98 100644 (file)
@@ -3,7 +3,7 @@
 
 #ifdef SVQC
 void WarpZone_StartFrame();
-float WarpZone_Projectile_Touch();
+float WarpZone_Projectile_Touch(entity this);
 
 // THESE must be defined by calling QC code:
 void WarpZone_PostTeleportPlayer_Callback(entity pl);
index 2ddeb63..0d59fa6 100644 (file)
@@ -807,7 +807,7 @@ void havocbot_movetogoal(entity this)
                                this.aistatus |= AI_STATUS_DANGER_AHEAD;
                }
 
-               dodge = havocbot_dodge();
+               dodge = havocbot_dodge(this);
                dodge = dodge * bound(0,0.5+(skill+this.bot_dodgeskill)*0.1,1);
                evadelava = evadelava * bound(1,3-(skill+this.bot_dodgeskill),3); //Noobs fear lava a lot and take more distance from it
                traceline(this.origin, ( ( this.enemy.absmin + this.enemy.absmax ) * 0.5 ), true, world);
@@ -1268,12 +1268,11 @@ void havocbot_setupbot(entity this)
        havocbot_chooserole(this);
 }
 
-vector havocbot_dodge()
+vector havocbot_dodge(entity this)
 {
        // LordHavoc: disabled because this is too expensive
        return '0 0 0';
 #if 0
-SELFPARAM();
        entity head;
        vector dodge, v, n;
        float danger, bestdanger, vl, d;
index 36b4c33..4a391b6 100644 (file)
@@ -47,7 +47,7 @@ float havocbot_resetgoal(entity this);
 float havocbot_moveto(entity this, vector pos);
 float havocbot_moveto_refresh_route(entity this);
 
-vector havocbot_dodge();
+vector havocbot_dodge(entity this);
 
 .void(entity this) havocbot_role;
 .void(entity this) havocbot_previous_role;
index 5bacd0d..14f7439 100644 (file)
@@ -183,14 +183,13 @@ void print_to(entity to, string input)
 // ==========================================
 
 // used by CommonCommand_timeout() and CommonCommand_timein() to handle game pausing and messaging and such.
-void timeout_handler_reset()
+void timeout_handler_reset(entity this)
 {
-       SELFPARAM();
-       timeout_caller = world;
+       timeout_caller = NULL;
        timeout_time = 0;
        timeout_leadtime = 0;
 
-       remove(self);
+       remove(this);
 }
 
 void timeout_handler_think(entity this)
@@ -221,7 +220,7 @@ void timeout_handler_think(entity this)
                                        it.fixangle = false;
                                ));
 
-                               timeout_handler_reset();
+                               timeout_handler_reset(this);
                        }
 
                        return;
@@ -265,7 +264,7 @@ void timeout_handler_think(entity this)
                case TIMEOUT_INACTIVE:
                default:
                {
-                       timeout_handler_reset();
+                       timeout_handler_reset(this);
                        return;
                }
        }
@@ -472,7 +471,7 @@ void CommonCommand_info(float request, entity caller, float argc)
                {
                        string command = builtin_cvar_string(strcat("sv_info_", argv(1)));
 
-                       if (command) wordwrap_sprint(command, 1000);
+                       if (command) wordwrap_sprint(caller, command, 1000);
                        else print_to(caller, "ERROR: unsupported info command");
 
                        return;  // never fall through to usage
index a45d913..63b1c70 100644 (file)
@@ -98,7 +98,7 @@ void print_to(entity to, string input);
 // ==========================================
 
 // used by CommonCommand_timeout() and CommonCommand_timein() to handle game pausing and messaging and such.
-void timeout_handler_reset();
+void timeout_handler_reset(entity this);
 
 void timeout_handler_think(entity this);
 
index 3be5e66..1b5e22b 100644 (file)
@@ -305,7 +305,7 @@ void GrapplingHookTouch (entity this)
 {
        if(other.movetype == MOVETYPE_FOLLOW)
                return;
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        GrapplingHook_Stop();
 
index 634d3fb..2d52916 100644 (file)
@@ -122,7 +122,7 @@ void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomo
 #define ITEM_TOUCH_NEEDKILL() (((trace_dpstartcontents | trace_dphitcontents) & DPCONTENTS_NODROP) || (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SKY))
 #define ITEM_DAMAGE_NEEDKILL(dt) (((dt) == DEATH_HURTTRIGGER.m_id) || ((dt) == DEATH_SLIME.m_id) || ((dt) == DEATH_LAVA.m_id) || ((dt) == DEATH_SWAMP.m_id))
 
-#define PROJECTILE_TOUCH if(WarpZone_Projectile_Touch()) return
+#define PROJECTILE_TOUCH(this) MACRO_BEGIN if (WarpZone_Projectile_Touch(this)) return; MACRO_END
 
 #define CENTER_OR_VIEWOFS(ent) (ent.origin + (IS_PLAYER(ent) ? ent.view_ofs : ((ent.mins + ent.maxs) * 0.5)))
 
index 15a845c..09b8172 100644 (file)
@@ -23,10 +23,10 @@ void pathlib_showpath(entity start)
     }
 }
 
-void path_dbg_think()
-{SELFPARAM();
-    pathlib_showpath(self);
-    self.nextthink = time + 1;
+void path_dbg_think(entity this)
+{
+    pathlib_showpath(this);
+    this.nextthink = time + 1;
 }
 
 void __showpath2_think(entity this)
index b3ae090..c033f3f 100644 (file)
@@ -379,8 +379,8 @@ entity path_build(entity next, vector where, entity prev, entity start)
     return path;
 }
 
-entity pathlib_astar(vector from,vector to)
-{SELFPARAM();
+entity pathlib_astar(entity this, vector from,vector to)
+{
     entity path, start, end, open, n, ln;
     float ptime, ftime, ctime;
 
@@ -442,8 +442,8 @@ entity pathlib_astar(vector from,vector to)
     pathlib_movecost_waterfactor = 25000000;
     pathlib_foundgoal      = 0;
 
-    movenode_boxmax   = self.maxs * 1.1;
-    movenode_boxmin   = self.mins * 1.1;
+    movenode_boxmax   = this.maxs * 1.1;
+    movenode_boxmin   = this.mins * 1.1;
 
     movenode_stepsize = pathlib_gridsize * 0.25;