Skip to content

Commit

Permalink
Fix snapshot handling when converting 0.7 demo snapshot failed
Browse files Browse the repository at this point in the history
Only prevent demo recording instead of ignoring most of the snapshot by returning early when coverting the snapshot for demo recording failed.
  • Loading branch information
Robyt3 committed Sep 19, 2024
1 parent 050bf0b commit d48ac15
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/engine/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2006,17 +2006,19 @@ void CClient::ProcessServerPacket(CNetChunk *pPacket, int Conn, bool Dummy)
if(DemoSnapSize < 0)
{
dbg_msg("sixup", "demo snapshot failed. error=%d", DemoSnapSize);
return;
}
}

// add snapshot to demo
for(auto &DemoRecorder : m_aDemoRecorder)
if(DemoSnapSize >= 0)
{
if(DemoRecorder.IsRecording())
// add snapshot to demo
for(auto &DemoRecorder : m_aDemoRecorder)
{
// write snapshot
DemoRecorder.RecordSnapshot(GameTick, IsSixup() ? pSnapSeven : pTmpBuffer3, DemoSnapSize);
if(DemoRecorder.IsRecording())
{
// write snapshot
DemoRecorder.RecordSnapshot(GameTick, IsSixup() ? pSnapSeven : pTmpBuffer3, DemoSnapSize);
}
}
}
}
Expand Down

0 comments on commit d48ac15

Please sign in to comment.