From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 17:44:50 +0000 (+0000) Subject: Make primary fire work in vehicles if the player has no gun X-Git-Tag: xonotic-v0.8.6~18^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9cd4c37ef96aa613883fec551a897a8c49cea33b;p=xonotic%2Fxonotic-data.pk3dir.git Make primary fire work in vehicles if the player has no gun --- 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; }