]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Call w_ready on weapon entity if its state isn't clear and switchweapon is null,...
authorMario <mario@smbclan.net>
Mon, 5 Feb 2018 12:43:08 +0000 (22:43 +1000)
committerMario <mario@smbclan.net>
Mon, 5 Feb 2018 12:43:08 +0000 (22:43 +1000)
qcsrc/server/weapons/weaponsystem.qc

index 2f6fcb68d7213cbafc508343d377da932944ad0a..c7e365614b63e46fedd11c6a58e714903d1c9fb3 100644 (file)
@@ -472,6 +472,8 @@ void W_WeaponFrame(Player actor, .entity weaponentity)
 
        if (this.m_switchweapon == WEP_Null)
        {
+               if (this.state != WS_CLEAR)
+                       w_ready(this.m_weapon, actor, weaponentity, button_atck | (button_atck2 << 1));
                this.m_weapon = WEP_Null;
                this.m_switchingweapon = WEP_Null;
                this.state = WS_CLEAR;