From 9cd4c37ef96aa613883fec551a897a8c49cea33b Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 17:44:50 +0000 Subject: [PATCH] Make primary fire work in vehicles if the player has 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 df6490128..20e713c2a 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