mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge branch 'master' of http://github.com/btd/DDRace
This commit is contained in:
commit
76f1dff55e
|
@ -652,12 +652,14 @@ void CGameContext::OnMessage(int MsgId, CUnpacker *pUnpacker, int ClientId)
|
|||
if(MsgId == NETMSGTYPE_CL_SAY)
|
||||
{
|
||||
CNetMsg_Cl_Say *pMsg = (CNetMsg_Cl_Say *)pRawMsg;
|
||||
//int Team = pMsg->m_Team;
|
||||
int Team = pMsg->m_Team;
|
||||
//if(Team)
|
||||
int GameTeam = ((CGameControllerDDRace*)m_pController)->m_Teams.m_Core.Team(pPlayer->GetCID());
|
||||
int Team = (pPlayer->GetTeam() == -1) ? CHAT_SPEC : (GameTeam == 0 ? CHAT_ALL : GameTeam);
|
||||
//else
|
||||
// Team = CGameContext::CHAT_ALL;
|
||||
if(Team) {
|
||||
Team = (pPlayer->GetTeam() == -1) ? CHAT_SPEC : (GameTeam == 0 ? CHAT_ALL : GameTeam);
|
||||
} else {
|
||||
Team = CHAT_ALL;
|
||||
}
|
||||
|
||||
if(/*g_Config.m_SvSpamprotection && */pPlayer->m_Last_Chat && pPlayer->m_Last_Chat + Server()->TickSpeed() + g_Config.m_SvChatDelay > Server()->Tick())
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue