Merge pull request #7528 from furo321/statboard-killmsgteam

Count deaths in statboard from `KILLMSGTEAM`
This commit is contained in:
Dennis Felsing 2023-11-23 07:26:56 +00:00 committed by GitHub
commit 6fc27bea8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,6 +73,20 @@ void CStatboard::OnMessage(int MsgType, void *pRawMsg)
else
pStats[pMsg->m_Victim].m_Suicides++;
}
else if(MsgType == NETMSGTYPE_SV_KILLMSGTEAM)
{
CNetMsg_Sv_KillMsgTeam *pMsg = (CNetMsg_Sv_KillMsgTeam *)pRawMsg;
CGameClient::CClientStats *pStats = m_pClient->m_aStats;
for(int i = 0; i < MAX_CLIENTS; i++)
{
if(m_pClient->m_Teams.Team(i) == pMsg->m_Team)
{
pStats[i].m_Deaths++;
pStats[i].m_Suicides++;
}
}
}
else if(MsgType == NETMSGTYPE_SV_CHAT)
{
CNetMsg_Sv_Chat *pMsg = (CNetMsg_Sv_Chat *)pRawMsg;