diff options
author | oy <tom_adams@web.de> | 2023-06-16 18:53:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 18:53:13 +0200 |
commit | ef9169d2323007d58d027af69eca76a7c7db14be (patch) | |
tree | d8fd635b0b5aca67892fcc18c43aead408f6ffa1 | |
parent | 20c6942ee981ac4c6b5dd8aa51ce9110545a609c (diff) | |
parent | c07f6c66b76921a46b1c22dd29a823017a3558d3 (diff) |
Merge pull request #3195 from ChillerDragon/pr_de_recording
Only send CNetMsg_De_ClientLeave while recording
-rw-r--r-- | src/game/client/gameclient.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 897740b89..80cba6b14 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -901,11 +901,14 @@ void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker) { DoLeaveMessage(m_aClients[pMsg->m_ClientID].m_aName, pMsg->m_ClientID, pMsg->m_pReason); - CNetMsg_De_ClientLeave Msg; - Msg.m_pName = m_aClients[pMsg->m_ClientID].m_aName; - Msg.m_ClientID = pMsg->m_ClientID; - Msg.m_pReason = pMsg->m_pReason; - Client()->SendPackMsg(&Msg, MSGFLAG_NOSEND | MSGFLAG_RECORD); + if(m_pDemoRecorder->IsRecording()) + { + CNetMsg_De_ClientLeave Msg; + Msg.m_pName = m_aClients[pMsg->m_ClientID].m_aName; + Msg.m_ClientID = pMsg->m_ClientID; + Msg.m_pReason = pMsg->m_pReason; + Client()->SendPackMsg(&Msg, MSGFLAG_NOSEND | MSGFLAG_RECORD); + } } m_GameInfo.m_NumPlayers--; |