diff options
| author | oy <Tom_Adams@web.de> | 2011-12-30 22:30:28 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-12-30 22:30:28 +0100 |
| commit | 11cc0e78d7d88edd01c0867e849c75d0e43be832 (patch) | |
| tree | eb5f4a92bc1720d85d6c057e11f8c5d086140ae1 /src/game/server/gamecontext.cpp | |
| parent | ed4158e83743d7bba94bb6046781bcd434092677 (diff) | |
| download | zcatch-11cc0e78d7d88edd01c0867e849c75d0e43be832.tar.gz zcatch-11cc0e78d7d88edd01c0867e849c75d0e43be832.zip | |
removed chat spam for the team commands
Diffstat (limited to 'src/game/server/gamecontext.cpp')
| -rw-r--r-- | src/game/server/gamecontext.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index b393622d..53b109b8 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1066,12 +1066,12 @@ void CGameContext::ConSetTeamAll(IConsole::IResult *pResult, void *pUserData) int Team = clamp(pResult->GetInteger(0), -1, 1); char aBuf[256]; - str_format(aBuf, sizeof(aBuf), "moved all clients to team %d", Team); - pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", aBuf); + str_format(aBuf, sizeof(aBuf), "All players were moved to the %s", pSelf->m_pController->GetTeamName(Team)); + pSelf->SendChat(-1, CGameContext::CHAT_ALL, aBuf); for(int i = 0; i < MAX_CLIENTS; ++i) if(pSelf->m_apPlayers[i]) - pSelf->m_apPlayers[i]->SetTeam(Team); + pSelf->m_apPlayers[i]->SetTeam(Team, false); (void)pSelf->m_pController->CheckTeamBalance(); } @@ -1082,12 +1082,12 @@ void CGameContext::ConSwapTeams(IConsole::IResult *pResult, void *pUserData) if(!pSelf->m_pController->IsTeamplay()) return; - pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", "swapped the current teams"); + pSelf->SendChat(-1, CGameContext::CHAT_ALL, "Teams were swapped"); for(int i = 0; i < MAX_CLIENTS; ++i) { if(pSelf->m_apPlayers[i] && pSelf->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS) - pSelf->m_apPlayers[i]->SetTeam(pSelf->m_apPlayers[i]->GetTeam()^1); + pSelf->m_apPlayers[i]->SetTeam(pSelf->m_apPlayers[i]->GetTeam()^1, false); } (void)pSelf->m_pController->CheckTeamBalance(); @@ -1107,26 +1107,26 @@ void CGameContext::ConShuffleTeams(IConsole::IResult *pResult, void *pUserData) ++PlayerTeam; PlayerTeam = (PlayerTeam+1)/2; - pSelf->Console()->Print(IConsole::OUTPUT_LEVEL_STANDARD, "server", "shuffled the current teams"); + pSelf->SendChat(-1, CGameContext::CHAT_ALL, "Teams were shuffled"); for(int i = 0; i < MAX_CLIENTS; ++i) { if(pSelf->m_apPlayers[i] && pSelf->m_apPlayers[i]->GetTeam() != TEAM_SPECTATORS) { if(CounterRed == PlayerTeam) - pSelf->m_apPlayers[i]->SetTeam(TEAM_BLUE); + pSelf->m_apPlayers[i]->SetTeam(TEAM_BLUE, false); else if(CounterBlue == PlayerTeam) - pSelf->m_apPlayers[i]->SetTeam(TEAM_RED); + pSelf->m_apPlayers[i]->SetTeam(TEAM_RED, false); else { if(rand() % 2) { - pSelf->m_apPlayers[i]->SetTeam(TEAM_BLUE); + pSelf->m_apPlayers[i]->SetTeam(TEAM_BLUE, false); ++CounterBlue; } else { - pSelf->m_apPlayers[i]->SetTeam(TEAM_RED); + pSelf->m_apPlayers[i]->SetTeam(TEAM_RED, false); ++CounterRed; } } |