From 16a9a20849203bf0e3127312a73c3ffac6a82489 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Tue, 6 Jun 2023 04:06:05 +0200 Subject: [PATCH] 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 --- qcsrc/server/weapons/weaponsystem.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2