From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 06:48:22 +0000 (+0200) Subject: battle royale: add missing IS_PLAYER check in PM_Physics hook which caused spectator... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=76fa5c92a89b7d97088b848f231f8f08e8c169f8;p=xonotic%2Fxonotic-data.pk3dir.git battle royale: add missing IS_PLAYER check in PM_Physics hook which caused spectator bugs and QC warnings --- diff --git a/qcsrc/common/gamemodes/gamemode/br/sv_br.qc b/qcsrc/common/gamemodes/gamemode/br/sv_br.qc index 39341bef7..de2f82e4c 100644 --- a/qcsrc/common/gamemodes/gamemode/br/sv_br.qc +++ b/qcsrc/common/gamemodes/gamemode/br/sv_br.qc @@ -545,6 +545,9 @@ MUTATOR_HOOKFUNCTION(br, PM_Physics) float maxspeed_mod = M_ARGV(1, float); float dt = M_ARGV(2, float); // tick rate + if(!IS_PLAYER(player)) + return false; + if(STAT(DROP, player) == DROP_TRANSPORT) return true;