From: Mario Date: Fri, 10 Jun 2016 14:51:55 +0000 (+1000) Subject: Kill off some now useless WITHSELF cases X-Git-Tag: xonotic-v0.8.2~840 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=da8bf18830fc6ce2af0787e6d326606985b3ad2b;p=xonotic%2Fxonotic-data.pk3dir.git Kill off some now useless WITHSELF cases --- diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 3d300777b..1cada9456 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -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) diff --git a/qcsrc/common/mutators/mutator/nades/nades.qc b/qcsrc/common/mutators/mutator/nades/nades.qc index 1ad59926e..d643d8790 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qc +++ b/qcsrc/common/mutators/mutator/nades/nades.qc @@ -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; } diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index daa0cb246..8967fba42 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -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) diff --git a/qcsrc/common/triggers/func/button.qc b/qcsrc/common/triggers/func/button.qc index 8424776ff..d8a267608 100644 --- a/qcsrc/common/triggers/func/button.qc +++ b/qcsrc/common/triggers/func/button.qc @@ -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); } } diff --git a/qcsrc/common/triggers/func/door.qc b/qcsrc/common/triggers/func/door.qc index 248896d8b..6484bdcdf 100644 --- a/qcsrc/common/triggers/func/door.qc +++ b/qcsrc/common/triggers/func/door.qc @@ -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)); diff --git a/qcsrc/common/triggers/func/door_secret.qc b/qcsrc/common/triggers/func/door_secret.qc index f0472fadc..a2d883ba0 100644 --- a/qcsrc/common/triggers/func/door_secret.qc +++ b/qcsrc/common/triggers/func/door_secret.qc @@ -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); } diff --git a/qcsrc/common/triggers/func/train.qc b/qcsrc/common/triggers/func/train.qc index 425a6fe8a..1ec63780f 100644 --- a/qcsrc/common/triggers/func/train.qc +++ b/qcsrc/common/triggers/func/train.qc @@ -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; diff --git a/qcsrc/common/triggers/platforms.qc b/qcsrc/common/triggers/platforms.qc index b29894664..9d2b3f2bc 100644 --- a/qcsrc/common/triggers/platforms.qc +++ b/qcsrc/common/triggers/platforms.qc @@ -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; diff --git a/qcsrc/common/triggers/subs.qc b/qcsrc/common/triggers/subs.qc index 6389a03cd..1595b9a9c 100644 --- a/qcsrc/common/triggers/subs.qc +++ b/qcsrc/common/triggers/subs.qc @@ -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); } diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index 48330d460..4ce98b944 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -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) diff --git a/qcsrc/common/triggers/trigger/multi.qc b/qcsrc/common/triggers/trigger/multi.qc index 539c3f065..1f08796dd 100644 --- a/qcsrc/common/triggers/trigger/multi.qc +++ b/qcsrc/common/triggers/trigger/multi.qc @@ -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 diff --git a/qcsrc/common/turrets/turret.qh b/qcsrc/common/turrets/turret.qh index 151797b6d..a66952833 100644 --- a/qcsrc/common/turrets/turret.qh +++ b/qcsrc/common/turrets/turret.qh @@ -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) */ diff --git a/qcsrc/common/vehicles/sv_vehicles.qc b/qcsrc/common/vehicles/sv_vehicles.qc index ec437b9cb..2709054b9 100644 --- a/qcsrc/common/vehicles/sv_vehicles.qc +++ b/qcsrc/common/vehicles/sv_vehicles.qc @@ -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, diff --git a/qcsrc/common/weapons/weapon/arc.qc b/qcsrc/common/weapons/weapon/arc.qc index 91aece258..4908a7ee5 100644 --- a/qcsrc/common/weapons/weapon/arc.qc +++ b/qcsrc/common/weapons/weapon/arc.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/electro.qc b/qcsrc/common/weapons/weapon/electro.qc index f8e7d8427..07c8aa85e 100644 --- a/qcsrc/common/weapons/weapon/electro.qc +++ b/qcsrc/common/weapons/weapon/electro.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/fireball.qc b/qcsrc/common/weapons/weapon/fireball.qc index 5c21c8ba1..d9da7edf0 100644 --- a/qcsrc/common/weapons/weapon/fireball.qc +++ b/qcsrc/common/weapons/weapon/fireball.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/hagar.qc b/qcsrc/common/weapons/weapon/hagar.qc index 7914c6b79..433ceefe2 100644 --- a/qcsrc/common/weapons/weapon/hagar.qc +++ b/qcsrc/common/weapons/weapon/hagar.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index 8bfc9ebc0..877c62bdd 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/mortar.qc b/qcsrc/common/weapons/weapon/mortar.qc index 8825fc0c5..7fdc4a685 100644 --- a/qcsrc/common/weapons/weapon/mortar.qc +++ b/qcsrc/common/weapons/weapon/mortar.qc @@ -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) diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index 10c2bd7a9..8a0254bfb 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -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); } } diff --git a/qcsrc/common/weapons/weapon/seeker.qc b/qcsrc/common/weapons/weapon/seeker.qc index 71c24b59a..953a064da 100644 --- a/qcsrc/common/weapons/weapon/seeker.qc +++ b/qcsrc/common/weapons/weapon/seeker.qc @@ -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; } diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index c660279ef..2a4814e84 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -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) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index a7d31b061..bb687486e 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -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 diff --git a/qcsrc/server/mutators/mutator/gamemode_assault.qc b/qcsrc/server/mutators/mutator/gamemode_assault.qc index 701ff1670..d5685ca44 100644 --- a/qcsrc/server/mutators/mutator/gamemode_assault.qc +++ b/qcsrc/server/mutators/mutator/gamemode_assault.qc @@ -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