Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
revert "End round only if number of caught players >= (sv_last_standi…
Browse files Browse the repository at this point in the history
…ng_playe…"
  • Loading branch information
Teelevision committed May 11, 2016
1 parent c6e5bc4 commit 0c55c61
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
9 changes: 2 additions & 7 deletions src/game/server/gamemodes/zcatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand 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);
}
Expand Down Expand Up @@ -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()));
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
1 change: 0 additions & 1 deletion src/game/server/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0c55c61

Please sign in to comment.