Not too many messages

This commit is contained in:
def 2017-07-30 14:15:45 +02:00
parent 3eb079bd64
commit c12082c2ef

View file

@ -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); for (int i = 0; i < MAX_CLIENTS; ++i)
if (m_Core.Team(ClientID) == m_Core.Team(i) && pPlayer && (pPlayer->IsPlaying() || TeamLocked(m_Core.Team(ClientID))))
{ {
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);
}
} }
} }
} }