]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
wr_resetplayer no longer needs WITHSELF
authorMario <mario@smbclan.net>
Fri, 10 Jun 2016 14:35:42 +0000 (00:35 +1000)
committerMario <mario@smbclan.net>
Fri, 10 Jun 2016 14:35:42 +0000 (00:35 +1000)
qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
qcsrc/common/mutators/mutator/nix/nix.qc
qcsrc/server/cl_player.qc

index 5a4f7e3a045a1266057350d5cf487a9c2839f608..3d300777b6d759111506f014ec1981ca9f8db192 100644 (file)
@@ -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);
 
index 9c1f4bc7ad7cf68842d98d9e929052bf29adb604..6288d1a4eb3dd3f73fd26e077b058ce70ba3ae00 100644 (file)
@@ -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
index 173191ddc27502c616025b28cd515662bcd83215..3435c2b2960e5c47b976580d4ed33f8040762119 100644 (file)
@@ -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;