diff options
Diffstat (limited to 'src/game/server/gamecontroller.cpp')
| -rw-r--r-- | src/game/server/gamecontroller.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/game/server/gamecontroller.cpp b/src/game/server/gamecontroller.cpp index 5f330110..58c4d9f0 100644 --- a/src/game/server/gamecontroller.cpp +++ b/src/game/server/gamecontroller.cpp @@ -255,7 +255,11 @@ void IGameController::CycleMap() return; if(m_RoundCount < g_Config.m_SvRoundsPerMap-1) + { + if(g_Config.m_SvRoundSwap) + GameServer()->SwapTeams(); return; + } // handle maprotation const char *pMapRotation = g_Config.m_SvMaprotation; @@ -436,8 +440,12 @@ void IGameController::Tick() } } + // game is Paused + if(GameServer()->m_World.m_Paused) + ++m_RoundStartTick; + // do team-balancing - if (IsTeamplay() && m_UnbalancedTick != -1 && Server()->Tick() > m_UnbalancedTick+g_Config.m_SvTeambalanceTime*Server()->TickSpeed()*60) + if(IsTeamplay() && m_UnbalancedTick != -1 && Server()->Tick() > m_UnbalancedTick+g_Config.m_SvTeambalanceTime*Server()->TickSpeed()*60) { GameServer()->Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", "Balancing teams"); @@ -496,6 +504,13 @@ void IGameController::Tick() { for(int i = 0; i < MAX_CLIENTS; ++i) { + #ifdef CONF_DEBUG + if(g_Config.m_DbgDummies) + { + if(i >= MAX_CLIENTS-g_Config.m_DbgDummies) + break; + } + #endif if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS && !Server()->IsAuthed(i)) { if(Server()->Tick() > GameServer()->m_apPlayers[i]->m_LastActionTick+g_Config.m_SvInactiveKickTime*Server()->TickSpeed()*60) @@ -605,7 +620,7 @@ bool IGameController::CanJoinTeam(int Team, int NotThisID) } } - return (aNumplayers[0] + aNumplayers[1]) < g_Config.m_SvMaxClients-g_Config.m_SvSpectatorSlots; + return (aNumplayers[0] + aNumplayers[1]) < Server()->MaxClients()-g_Config.m_SvSpectatorSlots; } bool IGameController::CheckTeamBalance() |