]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill off some now useless WITHSELF cases
authorMario <mario@smbclan.net>
Fri, 10 Jun 2016 14:51:55 +0000 (00:51 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Jun 2016 14:51:55 +0000 (00:51 +1000)
24 files changed:
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/t_items.qc
qcsrc/common/triggers/func/button.qc
qcsrc/common/triggers/func/door.qc
qcsrc/common/triggers/func/door_secret.qc
qcsrc/common/triggers/func/train.qc
qcsrc/common/triggers/platforms.qc
qcsrc/common/triggers/subs.qc
qcsrc/common/triggers/target/music.qc
qcsrc/common/triggers/trigger/multi.qc
qcsrc/common/turrets/turret.qh
qcsrc/common/vehicles/sv_vehicles.qc
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/fireball.qc
qcsrc/common/weapons/weapon/hagar.qc
qcsrc/common/weapons/weapon/hook.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/porto.qc
qcsrc/common/weapons/weapon/seeker.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/server/command/vote.qc
qcsrc/server/mutators/mutator/gamemode_assault.qc

index 3d300777b6d759111506f014ec1981ca9f8db192..1cada9456d752fccea2edb556d78a5fab4184939 100644 (file)
@@ -198,7 +198,7 @@ void GiveBall(entity plyr, entity ball)
        Weapon w = WEP_NEXBALL;
        w.wr_resetplayer(w, plyr);
        PS(plyr).m_switchweapon = WEP_NEXBALL;
-       WITHSELF(plyr, W_SwitchWeapon(plyr, WEP_NEXBALL));
+       W_SwitchWeapon(plyr, WEP_NEXBALL);
 }
 
 void DropBall(entity ball, vector org, vector vel)
index 1ad59926e546a44e04a8b12421d02e307e77bc35..d643d8790c1cedfc074272cfcb239ab9dfaa2e42 100644 (file)
@@ -751,7 +751,7 @@ void nade_damage(entity this, entity inflictor, entity attacker, float damage, i
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
        {
                this.takedamage = DAMAGE_NO;
-               WITHSELF(this, nade_boom(this));
+               nade_boom(this);
                return;
        }
 
index daa0cb246e1debfa5598f4111897863932ff18f7..8967fba42d3ce6f45b3a08bfc372f5582a7bd350 100644 (file)
@@ -1026,7 +1026,7 @@ float commodity_pickupevalfunc(entity player, entity item)
 void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        if(ITEM_DAMAGE_NEEDKILL(deathtype))
-               WITHSELF(this, RemoveItem(this));
+               RemoveItem(this);
 }
 
 void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter)
index 8424776ff0645a1c39ccfda635d81d05ba24d9c0..d8a267608a4fe963f1185171417044e80f843b0b 100644 (file)
@@ -65,7 +65,7 @@ void button_use(entity this, entity actor, entity trigger)
                return;
 
        this.enemy = actor;
-       WITHSELF(this, button_fire(this));
+       button_fire(this);
 }
 
 void button_touch(entity this)
@@ -91,7 +91,7 @@ void button_damage(entity this, entity inflictor, entity attacker, float damage,
        if (this.health <= 0)
        {
                this.enemy = damage_attacker;
-               WITHSELF(this, button_fire(this));
+               button_fire(this);
        }
 }
 
index 248896d8b2f2ce5cdb778663a22d34ed0d8c60a3..6484bdcdf3f4cfe9da5052cac8f9aa2254da41d1 100644 (file)
@@ -218,9 +218,9 @@ void door_fire(entity this, entity actor, entity trigger)
                        entity e = this;
                        do {
                                if (e.classname == "door") {
-                                       WITHSELF(e, door_go_down(e));
+                                       door_go_down(e);
                                } else {
-                                       WITHSELF(e, door_rotating_go_down(e));
+                                       door_rotating_go_down(e);
                                }
                                e = e.enemy;
                        } while ((e != this) && (e != NULL));
index f0472fadc4b2d71f4110fccee7f05a71c66e299c..a2d883ba068299ff78f51101bdcb9bad1a289741 100644 (file)
@@ -58,7 +58,7 @@ void fd_secret_use(entity this, entity actor, entity trigger)
                this.dest1 = this.origin + v_right * (this.t_width * temp);
 
        this.dest2 = this.dest1 + v_forward * this.t_length;
-       WITHSELF(this, SUB_CalcMove(this, this.dest1, TSPEED_LINEAR, this.speed, fd_secret_move1));
+       SUB_CalcMove(this, this.dest1, TSPEED_LINEAR, this.speed, fd_secret_move1);
        if (this.noise2 != "")
                _sound(this, CH_TRIGGER_SINGLE, this.noise2, VOL_BASE, ATTEN_NORM);
 }
index 425a6fe8a23302176a621d62755236a60e08990c..1ec63780f12dfde25ffed5ba88c068d534dcc19f 100644 (file)
@@ -324,7 +324,7 @@ NET_HANDLE(ENT_CLIENT_TRAIN, bool isnew)
                // but we will need these
                //this.move_nextthink = this.move_ltime + 0.1;
                //this.move_think = train_next;
-               WITHSELF(this, train_next(this));
+               train_next(this);
 
                this.move_movetype = MOVETYPE_PUSH;
                this.move_origin = this.origin;
index b29894664edd80f2db8bf3e95c2f2a0119c3c2c9..9d2b3f2bc371911fe65a3120db65064c49fa1339 100644 (file)
@@ -103,8 +103,7 @@ void plat_center_touch(entity this)
 #endif
 
        if (this.enemy.state == 2) {
-               entity e = this.enemy;
-               WITHSELF(e, plat_go_up(e));
+               plat_go_up(this.enemy);
        } else if (this.enemy.state == 1)
                this.enemy.SUB_NEXTTHINK = this.enemy.SUB_LTIME + 1;
 }
@@ -124,7 +123,7 @@ void plat_outside_touch(entity this)
 
        if (this.enemy.state == 1) {
            entity e = this.enemy;
-               WITHSELF(e, plat_go_down(e));
+               plat_go_down(e);
     }
 }
 
@@ -137,7 +136,7 @@ void plat_trigger_use(entity this, entity actor, entity trigger)
        if(this.move_think)
                return;
 #endif
-       WITHSELF(this, plat_go_down(this));
+       plat_go_down(this);
 }
 
 
@@ -176,7 +175,7 @@ void plat_use(entity this, entity actor, entity trigger)
        this.use = func_null;
        if (this.state != 4)
                objerror ("plat_use: not in up state");
-       WITHSELF(this, plat_go_down(this));
+       plat_go_down(this);
 }
 
 .string sound1, sound2;
index 6389a03cda7f450bef288cba18feba5e48aa4991..1595b9a9cf3b2824bae35f8422a32f7383c2ef09 100644 (file)
@@ -290,7 +290,7 @@ void SUB_CalcMove (entity this, vector tdest, float tspeedtype, float tspeed, vo
 
 void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
 {
-       WITHSELF(ent, SUB_CalcMove(ent, tdest, tspeedtype, tspeed, func));
+       SUB_CalcMove(ent, tdest, tspeedtype, tspeed, func);
 }
 
 /*
@@ -358,5 +358,5 @@ void SUB_CalcAngleMove (entity this, vector destangle, float tspeedtype, float t
 
 void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
 {
-       WITHSELF(ent, SUB_CalcAngleMove (ent, destangle, tspeedtype, tspeed, func));
+       SUB_CalcAngleMove (ent, destangle, tspeedtype, tspeed, func);
 }
index 48330d46011007e72e5d32e592da91f8c0fa01eb..4ce98b944b4907387ab66e058d850597e4a6a11b 100644 (file)
@@ -39,9 +39,9 @@ void target_music_kill()
        FOREACH_ENTITY_CLASS("target_music", true, {
                it.volume = 0;
         if (it.targetname == "")
-            WITHSELF(it, target_music_sendto(it, MSG_ALL, 1));
+            target_music_sendto(it, MSG_ALL, 1);
         else
-            WITHSELF(it, target_music_sendto(it, MSG_ALL, 0));
+            target_music_sendto(it, MSG_ALL, 0);
        });
 }
 void target_music_use(entity this, entity actor, entity trigger)
index 539c3f0650153947ea6ce635ec34c4fa0dadf526..1f08796dd65f99282a46a2fcf07cc2573363d235 100644 (file)
@@ -50,7 +50,7 @@ void multi_trigger(entity this)
        }
        else if (this.wait == 0)
        {
-               WITHSELF(this, multi_wait(this)); // waiting finished
+               multi_wait(this); // waiting finished
        }
        else
        {       // we can't just remove (this) here, because this is a touch function
index 151797b6d891c3360ef1d861048c11f85b1da9a1..a66952833a10fe877c7ba2a806cc474da50be5ba 100644 (file)
@@ -48,7 +48,7 @@ CLASS(Turret, Object)
     METHOD(Turret, tr_attack, void(Turret this, entity it)) {
         Weapon w = this.m_weapon;
         .entity weaponentity = weaponentities[0];
-        w.wr_think(w, this, weaponentity, 1);
+        w.wr_think(w, it, weaponentity, 1);
     }
 #endif
     /** (ALL) */
index ec437b9cb6559b6779e197c84f9f0f01ca295055..2709054b9ae11725df4700f7c07716a166b9900d 100644 (file)
@@ -234,7 +234,7 @@ void vehicles_projectile_explode(entity this)
 
 void vehicles_projectile_explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, vehicles_projectile_explode(this));
+       vehicles_projectile_explode(this);
 }
 
 entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
index 91aece258e0defa4272e82ffe663245a7aca2640..4908a7ee5c94116443007d0cf35f1b31a0e59d35 100644 (file)
@@ -241,7 +241,7 @@ void W_Arc_Bolt_Explode(entity this)
 
 void W_Arc_Bolt_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Arc_Bolt_Explode(this));
+       W_Arc_Bolt_Explode(this);
 }
 
 void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
index f8e7d8427f88c93ed4707c2ed45329eed7088416..07c8aa85e25604a3e3f050086256994027f77bf9 100644 (file)
@@ -193,7 +193,7 @@ void W_Electro_Explode(entity this)
 
 void W_Electro_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Electro_Explode(this));
+       W_Electro_Explode(this);
 }
 
 void W_Electro_TouchExplode(entity this)
index 5c21c8ba159a1095aff836c233e41aa9afe127ad..d9da7edf080bded9324e58ae03fec255f38d5cfb 100644 (file)
@@ -114,7 +114,7 @@ void W_Fireball_Explode(entity this)
 
 void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Fireball_Explode(this));
+       W_Fireball_Explode(this);
 }
 
 void W_Fireball_TouchExplode(entity this)
index 7914c6b798c34c6c9a6e7f90cd2118fc2763a012..433ceefe2958fedc3a003e921deac6813a03988e 100644 (file)
@@ -73,7 +73,7 @@ void W_Hagar_Explode(entity this)
 
 void W_Hagar_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Hagar_Explode(this));
+       W_Hagar_Explode(this);
 }
 
 void W_Hagar_Explode2(entity this)
@@ -86,7 +86,7 @@ void W_Hagar_Explode2(entity this)
 
 void W_Hagar_Explode2_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Hagar_Explode2(this));
+       W_Hagar_Explode2(this);
 }
 
 void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
index 8bfc9ebc025231495f284dd5170c8af9358c26ad..877c62bdd0aebcd6ef1ea9aeed72025383cec9ca 100644 (file)
@@ -120,7 +120,7 @@ void W_Hook_Explode2(entity this)
 
 void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Hook_Explode2(this));
+       W_Hook_Explode2(this);
 }
 
 void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
index 8825fc0c54c3003f3635ec241505921a3d43ee24..7fdc4a6853fb514744c868aa765761584abab899 100644 (file)
@@ -86,7 +86,7 @@ void W_Mortar_Grenade_Explode(entity this)
 
 void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Mortar_Grenade_Explode(this));
+       W_Mortar_Grenade_Explode(this);
 }
 
 void W_Mortar_Grenade_Explode2(entity this)
@@ -111,7 +111,7 @@ void W_Mortar_Grenade_Explode2(entity this)
 
 void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Mortar_Grenade_Explode2(this));
+       W_Mortar_Grenade_Explode2(this);
 }
 
 void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
index 10c2bd7a9ea288f58059ceb25cab722e1118c0c4..8a0254bfb63ffe43bf2df8c61cfd372028bd6405 100644 (file)
@@ -105,7 +105,7 @@ void W_Porto_Remove(entity p)
 {
        if(p.porto_current.realowner == p && p.porto_current.classname == "porto")
        {
-               WITHSELF(p.porto_current, W_Porto_Fail(p.porto_current, 1));
+               W_Porto_Fail(p.porto_current, 1);
        }
 }
 
index 71c24b59a0335bd67dd52842052dc424b69df66d..953a064dae3c7d91919c83d5265ff884f5e735de 100644 (file)
@@ -315,7 +315,7 @@ void W_Seeker_Flac_Explode(entity this)
 
 void W_Seeker_Flac_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_Seeker_Flac_Explode(this));
+       W_Seeker_Flac_Explode(this);
 }
 
 void W_Seeker_Fire_Flac(Weapon thiswep, entity actor)
@@ -436,17 +436,17 @@ void W_Seeker_Vollycontroller_Think(entity this) // TODO: Merge this with W_Seek
        switch(c)
        {
                case 0:
-                       WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 -3.75 0', own.enemy));
+                       W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 -3.75 0', own.enemy);
                        break;
                case 1:
-                       WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 -3.75 0', own.enemy));
+                       W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 -3.75 0', own.enemy);
                        break;
                case 2:
-                       WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 +3.75 0', own.enemy));
+                       W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 +3.75 0', own.enemy);
                        break;
                case 3:
                default:
-                       WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 +3.75 0', own.enemy));
+                       W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 +3.75 0', own.enemy);
                        break;
        }
 
index c660279efa0899bd098733814cc8a12f10d6346c..2a4814e84fa1562cf4dc1beb764b294c5b2d4591 100644 (file)
@@ -230,7 +230,7 @@ void W_RocketMinsta_Laser_Explode (entity this)
 
 void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
 {
-       WITHSELF(this, W_RocketMinsta_Laser_Explode(this));
+       W_RocketMinsta_Laser_Explode(this);
 }
 
 void W_RocketMinsta_Laser_Touch (entity this)
index a7d31b0613c17f829a9eab8eb2e20499b220ea7f..bb687486e3396a95d60bd6dfdeed0e7d1ef50eef 100644 (file)
@@ -352,7 +352,7 @@ void reset_map(bool dorespawn)
                if (it.reset2) it.reset2(it);
        });
 
-       FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(WITHSELF(it, Unfreeze(it))));
+       FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(Unfreeze(it)));
 
        // Moving the player reset code here since the player-reset depends
        // on spawnpoint entities which have to be reset first --blub
index 701ff1670f386fae04834d51f20d6fc57b45f95d..d5685ca443f0cceacebd429314bf54118477482b 100644 (file)
@@ -262,7 +262,7 @@ void assault_new_round(entity this)
 
     FOREACH_ENTITY_FLAGS(vehicle_flags, VHF_ISVEHICLE, LAMBDA(
         vehicles_clearreturn(it);
-        WITHSELF(it, vehicles_spawn(it));
+        vehicles_spawn(it);
     ));
 
        // up round counter