]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
do not check for WS_READY while in a vehicle, this is only meaningful for weapons...
authorJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 6 Jun 2023 02:06:05 +0000 (04:06 +0200)
committerJuhu <5894800-Juhu_@users.noreply.gitlab.com>
Tue, 6 Jun 2023 18:19:14 +0000 (20:19 +0200)
fixes vehicle primary fire not working while the player carries no gun

qcsrc/server/weapons/weaponsystem.qc

index fcce2a23d7a3c2427ae03a31c0b15efcfe57ce0b..321a27dbf043303994d826e7b8835162bb00d98f 100644 (file)
@@ -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;
 }