Ensure finish info messages are initialized

Closes #7913.
This commit is contained in:
Robert Müller 2024-02-08 22:03:08 +01:00
parent cb0af02eae
commit 289b7b08c7

View file

@ -312,14 +312,16 @@ void CInfoMessages::OnRaceFinishMessage(const CNetMsg_Sv_RaceFinish *pMsg)
{
char aBuf[256];
CInfoMsg Finish;
CInfoMsg Finish{};
Finish.m_TeamSize = 1;
Finish.m_aVictimIds[0] = pMsg->m_ClientID;
Finish.m_VictimDDTeam = m_pClient->m_Teams.Team(Finish.m_aVictimIds[0]);
str_copy(Finish.m_aVictimName, m_pClient->m_aClients[Finish.m_aVictimIds[0]].m_aName);
Finish.m_aVictimRenderInfo[0] = m_pClient->m_aClients[pMsg->m_ClientID].m_RenderInfo;
Finish.m_KillerID = -1;
Finish.m_aKillerName[0] = '\0';
Finish.m_KillerRenderInfo.Reset();
Finish.m_Diff = pMsg->m_Diff;
Finish.m_RecordPersonal = (pMsg->m_RecordPersonal || pMsg->m_RecordServer);