From: Damián Viano Date: Tue, 18 Jun 2024 12:31:32 +0000 (-0300) Subject: Make sv_spectate to strictly forbid spectating, clients that can't join or are forcef... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dde6c3ea647ea7fbbb9494db21733b2aa5df79d8;p=xonotic%2Fxonotic-data.pk3dir.git Make sv_spectate to strictly forbid spectating, clients that can't join or are forcefully moved to spectating are kicked after g_maxplayers_spectator_blocktime. Fix #2884. --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6b2b73f1f..c97f09c77 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2700,6 +2700,8 @@ void PlayerFrame (entity this) anticheat_prethink(this); // Check if spectating is allowed + if (!autocvar_sv_spectate) blockSpectators = 1; + if (blockSpectators && IS_REAL_CLIENT(this) && (IS_SPEC(this) || IS_OBSERVER(this)) && !INGAME(this) && time > (CS(this).spectatortime + autocvar_g_maxplayers_spectator_blocktime))