From d13d4f7144d8a81b29603d6d66f65ac7ed38cd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Sun, 17 Nov 2024 16:20:36 +0100 Subject: [PATCH] Fix damage indicators being stuck after connecting dummy Do not reset the local time after the dummy is connected, as the local time is supposed to run continuously while on the same server. Resetting the local time caused damage indicators to become stuck, as the `s_LastLocalTime` value is in the future after resetting the local time. This also affected other effects like pickup location and bullet rotation, where this was not noticeable. Closes #4967. --- src/engine/client/client.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index b9242e42b..31f73aedb 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2041,12 +2041,15 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy) m_aapSnapshots[Conn][SNAP_CURRENT] = m_aSnapshotStorage[Conn].m_pLast; m_aPrevGameTick[Conn] = m_aapSnapshots[Conn][SNAP_PREV]->m_Tick; m_aCurGameTick[Conn] = m_aapSnapshots[Conn][SNAP_CURRENT]->m_Tick; - if(!Dummy) + if(Conn == CONN_MAIN) { m_LocalStartTime = time_get(); #if defined(CONF_VIDEORECORDER) IVideo::SetLocalStartTime(m_LocalStartTime); #endif + } + if(!Dummy) + { GameClient()->OnNewSnapshot(); } SetState(IClient::STATE_ONLINE);