mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Added break on primary message while still processing subsequent
This commit is contained in:
parent
877bd9afbd
commit
6ed2b2277d
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue