From 0c55c61aea9b53eb0eafba74c3f48bdc3221efcc Mon Sep 17 00:00:00 2001 From: Marius Neugebauer Date: Thu, 12 May 2016 01:09:19 +0200 Subject: [PATCH] =?UTF-8?q?revert=20"End=20round=20only=20if=20number=20of?= =?UTF-8?q?=20caught=20players=20>=3D=20(sv=5Flast=5Fstanding=5Fplaye?= =?UTF-8?q?=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game/server/gamemodes/zcatch.cpp | 9 ++------- src/game/server/player.cpp | 1 - src/game/server/player.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/game/server/gamemodes/zcatch.cpp b/src/game/server/gamemodes/zcatch.cpp index e25d60199b..084e6f7eda 100644 --- a/src/game/server/gamemodes/zcatch.cpp +++ b/src/game/server/gamemodes/zcatch.cpp @@ -115,13 +115,12 @@ void CGameController_zCatch::DoWincheck() } else if((Players - Players_Spec) == 1) { - bool lastStandingSituation = winner && (winner->m_zCatchNumKillsInARowThisRound + 1) < g_Config.m_SvLastStandingPlayers; for(int i = 0; i < MAX_CLIENTS; i++) { if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS) { GameServer()->m_apPlayers[i]->m_Score += g_Config.m_SvBonus; - if(lastStandingSituation) + if(Players_Ingame < g_Config.m_SvLastStandingPlayers) GameServer()->m_apPlayers[i]->ReleaseZCatchVictim(CPlayer::ZCATCH_RELEASE_ALL); } } @@ -132,10 +131,9 @@ void CGameController_zCatch::DoWincheck() GameServer()->SendChatTarget(-1, "The winner failed the hard mode."); GameServer()->SendBroadcast("The winner failed the hard mode.", -1); } - else if(lastStandingSituation) + else if(Players_Ingame < g_Config.m_SvLastStandingPlayers) { winner->HardModeRestart(); - winner->m_zCatchNumKillsInARowThisRound = 0; GameServer()->SendChatTarget(-1, "Too few players to end round."); GameServer()->SendBroadcast("Too few players to end round.", -1); } @@ -185,7 +183,6 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP if(pKiller->GetTeam() != TEAM_SPECTATORS && (!pVictim->m_KillerLastDieTickBeforceFiring || pVictim->m_KillerLastDieTickBeforceFiring == pKiller->m_DieTick)) { ++pKiller->m_zCatchNumKillsInARow; - ++pKiller->m_zCatchNumKillsInARowThisRound; pKiller->AddZCatchVictim(victim->GetCID(), CPlayer::ZCATCH_CAUGHT_REASON_KILLED); char aBuf[256]; str_format(aBuf, sizeof(aBuf), "You are caught until '%s' dies.", Server()->ClientName(pKiller->GetCID())); @@ -205,7 +202,6 @@ int CGameController_zCatch::OnCharacterDeath(class CCharacter *pVictim, class CP // release all the victim's victims victim->ReleaseZCatchVictim(CPlayer::ZCATCH_RELEASE_ALL); victim->m_zCatchNumKillsInARow = 0; - victim->m_zCatchNumKillsInARowThisRound = 0; victim->m_zCatchNumKillsReleased = 0; // Update colours @@ -335,7 +331,6 @@ void CGameController_zCatch::EndRound() // release all players player->ReleaseZCatchVictim(CPlayer::ZCATCH_RELEASE_ALL); player->m_zCatchNumKillsInARow = 0; - player->m_zCatchNumKillsInARowThisRound = 0; } // zCatch/TeeVi: hard mode diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 54e8f699fe..eb0916f3a2 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -38,7 +38,6 @@ CPlayer::CPlayer(CGameContext *pGameServer, int ClientID, int Team) m_ZCatchVictims = NULL; m_zCatchNumVictims = 0; m_zCatchNumKillsInARow = 0; - m_zCatchNumKillsInARowThisRound = 0; m_zCatchNumKillsReleased = 0; ResetHardMode(); diff --git a/src/game/server/player.h b/src/game/server/player.h index 0565c9185c..ff1e9ace4c 100644 --- a/src/game/server/player.h +++ b/src/game/server/player.h @@ -130,7 +130,6 @@ class CPlayer CZCatchVictim *m_ZCatchVictims; int m_zCatchNumVictims; int m_zCatchNumKillsInARow; - int m_zCatchNumKillsInARowThisRound; int m_zCatchNumKillsReleased; bool m_zCatchJoinSpecWhenReleased; void AddZCatchVictim(int ClientID, int reason = ZCATCH_CAUGHT_REASON_JOINING);