From: Mario Date: Sat, 28 Jan 2017 08:59:40 +0000 (+1000) Subject: Minor tweak to make it actually work again X-Git-Tag: xonotic-v0.8.2~268 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f30aa5de1595c13feebe0fd663ce5293692840d0;p=xonotic%2Fxonotic-data.pk3dir.git Minor tweak to make it actually work again --- diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 452ac7f53..3347f2bb1 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -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;