From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 6 Jun 2023 02:06:05 +0000 (+0200) Subject: do not check for WS_READY while in a vehicle, this is only meaningful for weapons... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=16a9a20849203bf0e3127312a73c3ffac6a82489;p=xonotic%2Fxonotic-data.pk3dir.git do not check for WS_READY while in a vehicle, this is only meaningful for weapons carried in the player's hand fixes vehicle primary fire not working while the player carries no gun --- diff --git a/qcsrc/server/weapons/weaponsystem.qc b/qcsrc/server/weapons/weaponsystem.qc index fcce2a23d..321a27dbf 100644 --- a/qcsrc/server/weapons/weaponsystem.qc +++ b/qcsrc/server/weapons/weaponsystem.qc @@ -291,7 +291,7 @@ bool weapon_prepareattack_check(Weapon thiswep, entity actor, .entity weaponenti if (ATTACK_FINISHED(actor, weaponentity) > time + actor.(weaponentity).weapon_frametime * 0.5) return false; entity this = actor.(weaponentity); // don't fire while changing weapon - if (this.state != WS_READY) return false; + if (!actor.vehicle && this.state != WS_READY) return false; } return true; }