Merge pull request #9261 from Robyt3/Client-LocalTime-Dummy-Continuous

Fix damage indicators being stuck after connecting dummy
This commit is contained in:
heinrich5991 2024-11-17 15:53:05 +00:00 committed by GitHub
commit 4215bb47bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2041,12 +2041,15 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
m_aapSnapshots[Conn][SNAP_CURRENT] = m_aSnapshotStorage[Conn].m_pLast; m_aapSnapshots[Conn][SNAP_CURRENT] = m_aSnapshotStorage[Conn].m_pLast;
m_aPrevGameTick[Conn] = m_aapSnapshots[Conn][SNAP_PREV]->m_Tick; m_aPrevGameTick[Conn] = m_aapSnapshots[Conn][SNAP_PREV]->m_Tick;
m_aCurGameTick[Conn] = m_aapSnapshots[Conn][SNAP_CURRENT]->m_Tick; m_aCurGameTick[Conn] = m_aapSnapshots[Conn][SNAP_CURRENT]->m_Tick;
if(!Dummy) if(Conn == CONN_MAIN)
{ {
m_LocalStartTime = time_get(); m_LocalStartTime = time_get();
#if defined(CONF_VIDEORECORDER) #if defined(CONF_VIDEORECORDER)
IVideo::SetLocalStartTime(m_LocalStartTime); IVideo::SetLocalStartTime(m_LocalStartTime);
#endif #endif
}
if(!Dummy)
{
GameClient()->OnNewSnapshot(); GameClient()->OnNewSnapshot();
} }
SetState(IClient::STATE_ONLINE); SetState(IClient::STATE_ONLINE);