From ad704566876234284f6cb9d583a5c24687a2ec58 Mon Sep 17 00:00:00 2001 From: def Date: Tue, 2 Apr 2019 22:02:55 +0200 Subject: [PATCH] Some more dummy fixes (might fix #1415) --- src/engine/client/client.cpp | 21 +++++++++++---------- src/engine/client/client.h | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index e82468f1d..ce52b5661 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -347,6 +347,8 @@ CClient::CClient() : m_DemoPlayer(&m_SnapshotDelta) m_SnapshotStorage[1].Init(); m_ReceivedSnapshots[0] = 0; m_ReceivedSnapshots[1] = 0; + m_SnapshotParts[0] = 0; + m_SnapshotParts[1] = 0; m_VersionInfo.m_State = CVersionInfo::STATE_INIT; @@ -606,7 +608,7 @@ void CClient::OnEnterGame() m_aSnapshots[g_Config.m_ClDummy][SNAP_PREV] = 0; m_SnapshotStorage[g_Config.m_ClDummy].PurgeAll(); m_ReceivedSnapshots[g_Config.m_ClDummy] = 0; - m_SnapshotParts = 0; + m_SnapshotParts[g_Config.m_ClDummy] = 0; m_PredTick[g_Config.m_ClDummy] = 0; m_CurrentRecvTick[g_Config.m_ClDummy] = 0; m_CurGameTick[g_Config.m_ClDummy] = 0; @@ -1767,14 +1769,14 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket) { if(GameTick != m_CurrentRecvTick[g_Config.m_ClDummy]) { - m_SnapshotParts = 0; + m_SnapshotParts[g_Config.m_ClDummy] = 0; m_CurrentRecvTick[g_Config.m_ClDummy] = GameTick; } mem_copy((char*)m_aSnapshotIncomingData + Part*MAX_SNAPSHOT_PACKSIZE, pData, clamp(PartSize, 0, (int)sizeof(m_aSnapshotIncomingData) - Part*MAX_SNAPSHOT_PACKSIZE)); - m_SnapshotParts |= 1<