From f596368b185a211a86a321a41c4ff5e4bec7a5e9 Mon Sep 17 00:00:00 2001 From: jxsl13 Date: Sat, 20 Mar 2021 13:00:32 +0100 Subject: [PATCH] slight improvement to the previous very rare exploit situation --- src/game/server/gamemodes/zcatch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp index 4470975a6b..759c6ba019 100644 --- a/src/game/server/gamemodes/zcatch.cpp +++ b/src/game/server/gamemodes/zcatch.cpp @@ -1283,7 +1283,7 @@ void CGameControllerZCATCH::DoTeamChange(class CPlayer *pPlayer, int Team, bool if (pDominatingPlayer) { int caughtPlayers = pDominatingPlayer->GetNumTotalCaughtPlayers(); int playersLeftToCatch = pDominatingPlayer->GetPlayersLeftToCatch(); - if (1 + caughtPlayers + playersLeftToCatch == MAX_PLAYERS) { + if (1 + caughtPlayers + playersLeftToCatch == MAX_PLAYERS && playersLeftToCatch <= 2) { // edge case where leaving caught players allow spectators to join, // be caught, leave and allowing the next spectator to join. // the exploit can be done until the player has caught up to 15 players in total