From dacd233edc9521b77bb37875263b4d326a7e4ad1 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 11 Jun 2016 00:35:42 +1000 Subject: [PATCH] wr_resetplayer no longer needs WITHSELF --- qcsrc/common/gamemodes/gamemode/nexball/nexball.qc | 4 ++-- qcsrc/common/mutators/mutator/nix/nix.qc | 2 +- qcsrc/server/cl_player.qc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc index 5a4f7e3a0..3d300777b 100644 --- a/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc +++ b/qcsrc/common/gamemodes/gamemode/nexball/nexball.qc @@ -196,7 +196,7 @@ void GiveBall(entity plyr, entity ball) plyr.(weaponentity).m_switchweapon = PS(plyr).m_weapon; plyr.weapons = WEPSET(NEXBALL); Weapon w = WEP_NEXBALL; - WITHSELF(plyr, w.wr_resetplayer(w, plyr)); + w.wr_resetplayer(w, plyr); PS(plyr).m_switchweapon = WEP_NEXBALL; WITHSELF(plyr, W_SwitchWeapon(plyr, WEP_NEXBALL)); } @@ -997,7 +997,7 @@ MUTATOR_HOOKFUNCTION(nb, PlayerPreThink) { player.weapons = player.(weaponentity).weapons; Weapon w = WEP_NEXBALL; - WITHSELF(player, w.wr_resetplayer(w, player)); + w.wr_resetplayer(w, player); PS(player).m_switchweapon = player.(weaponentity).m_switchweapon; W_SwitchWeapon(player, PS(player).m_switchweapon); diff --git a/qcsrc/common/mutators/mutator/nix/nix.qc b/qcsrc/common/mutators/mutator/nix/nix.qc index 9c1f4bc7a..6288d1a4e 100644 --- a/qcsrc/common/mutators/mutator/nix/nix.qc +++ b/qcsrc/common/mutators/mutator/nix/nix.qc @@ -157,7 +157,7 @@ void NIX_GiveCurrentWeapon(entity this) else Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_NIX_NEWWEAPON, nix_weapon); - WITHSELF(this, e.wr_resetplayer(e, this)); + e.wr_resetplayer(e, this); // all weapons must be fully loaded when we spawn if(e.spawnflags & WEP_FLAG_RELOADABLE) // prevent accessing undefined cvars diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 173191ddc..3435c2b29 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -636,7 +636,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage, // reset fields the weapons may use just in case FOREACH(Weapons, it != WEP_Null, LAMBDA( - WITHSELF(this, it.wr_resetplayer(it, this)); + it.wr_resetplayer(it, this); for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot) { ATTACK_FINISHED_FOR(this, it.m_id, slot) = 0; -- 2.39.2