From 76fa5c92a89b7d97088b848f231f8f08e8c169f8 Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Sat, 10 Jun 2023 08:48:22 +0200 Subject: [PATCH] battle royale: add missing IS_PLAYER check in PM_Physics hook which caused spectator bugs and QC warnings --- qcsrc/common/gamemodes/gamemode/br/sv_br.qc | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2