]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minor tweak to make it actually work again
authorMario <mario@smbclan.net>
Sat, 28 Jan 2017 08:59:40 +0000 (18:59 +1000)
committerMario <mario@smbclan.net>
Sat, 28 Jan 2017 08:59:40 +0000 (18:59 +1000)
qcsrc/server/weapons/weaponsystem.qc

index 452ac7f533badd5084b92fd41454b4b312132e53..3347f2bb1e2a78d30ac52746e744140275cbb534 100644 (file)
@@ -452,15 +452,6 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
                }
        }
 
-       if (this.m_switchweapon == WEP_Null)
-       {
-               this.m_weapon = WEP_Null;
-               this.m_switchingweapon = WEP_Null;
-               this.state = WS_CLEAR;
-               this.weaponname = "";
-               return;
-       }
-
        if(autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0)
        {
                .entity wepe1 = weaponentities[0];
@@ -477,6 +468,15 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
                }
        }
 
+       if (this.m_switchweapon == WEP_Null)
+       {
+               this.m_weapon = WEP_Null;
+               this.m_switchingweapon = WEP_Null;
+               this.state = WS_CLEAR;
+               this.weaponname = "";
+               return;
+       }
+
        makevectors(actor.v_angle);
        vector fo = v_forward;  // save them in case the weapon think functions change it
        vector ri = v_right;