From c12082c2efd0e769924e19bd77243992fe1551e1 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 30 Jul 2017 14:15:45 +0200 Subject: [PATCH] Not too many messages --- src/game/server/teams.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/game/server/teams.cpp b/src/game/server/teams.cpp index 122aa6ca7..a7a5a0f4f 100644 --- a/src/game/server/teams.cpp +++ b/src/game/server/teams.cpp @@ -114,12 +114,15 @@ void CGameTeams::OnCharacterStart(int ClientID) } } - for (int i = 0; i < MAX_CLIENTS; ++i) + if (g_Config.m_SvTeam < 3 && g_Config.m_SvTeamMaxSize != 2 && g_Config.m_SvPauseable) { - CPlayer* pPlayer = GetPlayer(i); - if (m_Core.Team(ClientID) == m_Core.Team(i) && pPlayer && (pPlayer->IsPlaying() || TeamLocked(m_Core.Team(ClientID)))) + for (int i = 0; i < MAX_CLIENTS; ++i) { - GameServer()->SendChatTarget(i, aBuf); + CPlayer* pPlayer = GetPlayer(i); + if (m_Core.Team(ClientID) == m_Core.Team(i) && pPlayer && (pPlayer->IsPlaying() || TeamLocked(m_Core.Team(ClientID)))) + { + GameServer()->SendChatTarget(i, aBuf); + } } } }