From: Mario Date: Mon, 5 Feb 2018 12:43:08 +0000 (+1000) Subject: Call w_ready on weapon entity if its state isn't clear and switchweapon is null,... X-Git-Tag: xonotic-v0.8.5~2346 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f1296f5b79150dee1992cefa19c286851451df2d;p=xonotic%2Fxonotic-data.pk3dir.git Call w_ready on weapon entity if its state isn't clear and switchweapon is null, fixes offhand hook getting player stuck in firing animation --- diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index 2f6fcb68d..c7e365614 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -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;