]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 f96998592aee0671b969ac20f54cd54df60b50b1..e00bdddf29a59c111ccfd0ad97cea9bff071f77c 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 afa6db93f0a31c84cd9a69bef59c3601e6004427..cb9e3f165352178709e492fa24009284e92e12e0 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 50e9061308849f325382fdd41fa944a14d35e8f4..5b7bf3a56a512101e07ca5fafcfeb97fc6d633b9 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 c2e13883c6fe34ebe145ab1d402aa88f8205fe96..2e9384dc2adb0c37a78319c1ba6411e53328760f 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 281accb14444ce77dc5521e04a6c9207713d58a5..b9f9bfc21c2992807c513abaf5cd0c7649720138 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 a0e670507013ceddb3713db56d4038fad824aaac..ae8e8751de182271788f96ed8396065ad85a677c 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 a6a2f72284ceeaea49f50237af9c752083bcfcd6..4e339cea0ed3397acbe476a9f55742a84a0313f0 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 145817272011a73d5c2c15f103b7e14ce46e750e..b3b8f4248aef2f13070132af15e90dc39327e353 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 60ee6c86681c9cea49083b2723a58b6028041ef7..656d829a93ee26b86bc1acb345db9257bee196a3 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 3ba0a0deb87db2ce51440352ff864cd26a73ea18..5ebc9d7e6234f4e8bd06d1233f0584a91946a254 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 66b3f3dbb61d864a744a620845d809db1b32e0dc..769c0edf720bfc241d81a5b817f131bbebf6f7a9 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 40603cca0defdf6a9aa3e8599a16434f83e3fda3..113431003c93053903b04ae4768616314e6c6ff6 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 de7d282ec942fa170a9c8059aaca81a6110d9ed4..fec4060d44f30841b7fe32ca5b6403efce804600 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 ec643fcb5885cac7d20ccd0cfe0cf16b93b6ea80..52110137253b224511204353637be62d99d7d36c 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 066033a175a1791a2ce05326b223de57db40d4ae..fa17a06a328af4414350a1a9a29632f5114cd34b 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 19b71a0cee8cd618a1282db6379988652a89c66b..6f1d2d91842857a3ff07a26ca8a212a16a154d68 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 c2c266f00535844e6a4f3b9be2a760c98b93ad89..fc439734c0f78fbf71db2805d6f0ced5227f318d 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 e2936bd9599eefbccf03ca58056368d245869d3b..5df635f77d997af1a6a866fb2e2d929dc3cdc12c 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 5b583c1ac647877bdb67e94f5aeab6e87a828720..394d50c6946c76007c9f70fff3d60da78c1b94ba 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 fb24bcfdf3cad8e8fc25d34affded63d1d371a4f..a582f9843bf7047d884aa77fa9bbd6f773c99616 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 e04f812be81c097a88bcad4287b17bcdc30045f2..772b9ea6294c616d38aed6aa346de49ee4440e74 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 37dcf9f07e61e4c4de43d0573e0b3b0b3b89c82a..64a5e06aa0621f0dd826f943cd0eec7018bfa217 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 10a26e4440ab86a5afaaa54000aeacff12586dbf..3ee23e8f5f7a66f16682c004056b88e3a03635f3 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 e2274faafa6175287c42e5b9dddd16e2753b802b..577d4cf4e2671b562e8843601ce55a620e793609 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 928462a204e697c7e73c0274724eaa067488cf5c..3fa50ff0445565e0543a1dee20225326ecba2a7c 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 40f828f58f5a900a25f8e17409f4ed91afb0a4a7..7c4aabfe71e2b280e106bb4759cd893b81bf270d 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 ecb5059b53a4556c56dc2c7f12472597179c7af8..bc7f8eb39efbe6be32be3d9cb757bf355af3c402 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 ddff4a35d52d645c567b8cecd9d463b1cef38718..843eaa86bca170f6a9de49ba011c52cc05b792f4 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 5af840505dba1f432e1565dad6a5f02cc97d6a2e..0852555510eba9eef9b71b98dd546fffad1314cd 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 4fd81eb309c5a76ae531579e8c0e4f27767137bb..c4672e727c53a05a19c945308291801aecb8518f 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 dc2e4021fbc405283e1de904b13b9546ebbc648a..b02df19e0015a25a0f96df60d8abe5a3f5984976 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 c8a241f97dd82e680234403cd9142acea6fbe7aa..0fb8dd235ff99033e04148fa9662ff9764ee43cc 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 db0ba59cc0c812f76a74290b110c2a6471ec13aa..c6c7b9840c9c86dee6b67093a1e38f6e8cd87189 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 2ddeb639182a3664a1315a2a41aedf19dd742f38..0d59fa6e4251f1fad85259692af0062e519113d1 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 36b4c33fd9b5a3bdcfdf5645c97afda9c915821d..4a391b6e7ceb9682a2df64023aa98751e88974d1 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 5bacd0d87c14f7e6757a0e7d2337b16055e5a1a9..14f7439a4fcc35f3971acb942f9a75e9121dc809 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 a45d91343f255e0ccd88240fc39a6e9cd2bc6c7c..63b1c708f21f1bdea6a7fe441988bc2dd57e97bd 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 3be5e6667b1f5c2be1f67524d002b427a484259e..1b5e22bee56ed4e0ccd44c6f86847be5f46557b9 100644 (file)
@@ -305,7 +305,7 @@ void GrapplingHookTouch (entity this)
 {
        if(other.movetype == MOVETYPE_FOLLOW)
                return;
-       PROJECTILE_TOUCH;
+       PROJECTILE_TOUCH(this);
 
        GrapplingHook_Stop();
 
index 634d3fb647185594e04001b18c1b1790ecf17942..2d52916b1736141a58c67b814882029f7c95494c 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 15a845c5a104b9c874cdf443969cbff3ce870bad..09b81724ec1168ac49046317fb873c9c18e06f85 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 b3ae090fbe0fe64447e426d579dc0515d3edafcd..c033f3f52a6c4f9955becffb46ba20d4aed9e5a6 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;