Added break on primary message while still processing subsequent

This commit is contained in:
Kyle Bradley 2021-03-11 09:20:26 +02:00
parent 877bd9afbd
commit 6ed2b2277d

View file

@ -933,13 +933,21 @@ void CPlayer::ProcessScoreResult(CScorePlayerResult &Result)
}
break;
case CScorePlayerResult::ALL:
{
bool PrimaryMessage = true;
for(auto &aMessage : Result.m_Data.m_aaMessages)
{
if(aMessage[0] == 0)
break;
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aMessage, m_ClientID);
if(GameServer()->ProcessSpamProtection(m_ClientID) && PrimaryMessage)
break;
GameServer()->SendChat(-1, CGameContext::CHAT_ALL, aMessage, -1);
PrimaryMessage = false;
}
break;
}
case CScorePlayerResult::BROADCAST:
if(Result.m_Data.m_Broadcast[0] != 0)
GameServer()->SendBroadcast(Result.m_Data.m_Broadcast, -1);