Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/GameEngine/Include/Common/CRCDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@
extern Int NET_CRC_INTERVAL;
extern Int REPLAY_CRC_INTERVAL;
extern Bool TheDebugIgnoreSyncErrors;
extern Bool TheDebugIgnoreReplaySyncErrors;
11 changes: 11 additions & 0 deletions Core/GameEngine/Source/Common/CommandLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@


Bool TheDebugIgnoreSyncErrors = FALSE;
Bool TheDebugIgnoreReplaySyncErrors = FALSE;
extern Int DX8Wrapper_PreserveFPU;

#ifdef DEBUG_CRC
Expand Down Expand Up @@ -758,6 +759,15 @@ Int parseLoadReplay(char *args[], int num)
return 1;
}

// TheSuperHackers @feature bobtista 08/08/2026 Let diagnostic replay playback continue past a CRC
// mismatch without the UI report and pause that normal playback uses.
Int parseIgnoreReplaySyncErrors(char *args[], int)
{
TheDebugIgnoreReplaySyncErrors = true;

return 1;
}

//=============================================================================
//=============================================================================

Expand Down Expand Up @@ -1210,6 +1220,7 @@ static CommandLineParam paramsForEngineInit[] =

// TheSuperHackers @feature bobtista 08/08/2026 Play a replay file from the command line.
{ "-loadreplay", parseLoadReplay },
{ "-ignoreReplaySyncErrors", parseIgnoreReplaySyncErrors },

// TheSuperHackers @feature xezon 03/08/2025 Force full viewport for 'Control Bar Pro' Addons like GenTool did it.
{ "-forcefullviewport", parseFullViewport },
Expand Down
12 changes: 12 additions & 0 deletions Generals/Code/GameEngine/Source/Common/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,18 @@ void RecorderClass::handleCRCMessage(UnsignedInt newCRC, Int playerIndex, Bool f
// playbackCRC, newCRC, TheGameLogic->getFrame()-m_crcInfo.GetQueueSize()-1, playerIndex));
if (TheGameLogic->getFrame() > 0 && newCRC != playbackCRC && !m_crcInfo.sawCRCMismatch())
{
// TheSuperHackers @feature bobtista 08/08/2026 Diagnostic playback continues past a mismatch
// without the UI report and the pause that normal playback uses. The mismatch is not marked
// as seen, so every later mismatch is logged too and the playback does not count as failed.
if (TheDebugIgnoreReplaySyncErrors)
{
const UnsignedInt ignoredFrame = TheGameLogic->getFrame() - m_crcInfo.GetQueueSize() - 1;
DEBUG_LOG(("Replay CRC mismatch ignored\nInGame:%8.8X Replay:%8.8X\nFrame:%d",
playbackCRC, newCRC, ignoredFrame));
printf("CRC Mismatch in Frame %d (ignored)\n", ignoredFrame);
return;
}

// Since we don't seem to have any *visible* desyncs when replaying games, but get this warning
// virtually every replay, the assumption is our CRC checking is faulty. Since we're at the
// tail end of patch season, let's just disable the message, and hope the users believe the
Expand Down
12 changes: 12 additions & 0 deletions GeneralsMD/Code/GameEngine/Source/Common/Recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,18 @@ void RecorderClass::handleCRCMessage(UnsignedInt newCRC, Int playerIndex, Bool f
// playbackCRC, newCRC, TheGameLogic->getFrame()-m_crcInfo.GetQueueSize()-1, playerIndex));
if (TheGameLogic->getFrame() > 0 && newCRC != playbackCRC && !m_crcInfo.sawCRCMismatch())
{
// TheSuperHackers @feature bobtista 08/08/2026 Diagnostic playback continues past a mismatch
// without the UI report and the pause that normal playback uses. The mismatch is not marked
// as seen, so every later mismatch is logged too and the playback does not count as failed.
if (TheDebugIgnoreReplaySyncErrors)
{
const UnsignedInt ignoredFrame = TheGameLogic->getFrame() - m_crcInfo.GetQueueSize() - 1;
DEBUG_LOG(("Replay CRC mismatch ignored\nInGame:%8.8X Replay:%8.8X\nFrame:%d",
playbackCRC, newCRC, ignoredFrame));
printf("CRC Mismatch in Frame %d (ignored)\n", ignoredFrame);
return;
}

//Kris: Patch 1.01 November 10, 2003 (integrated changes from Matt Campbell)
// Since we don't seem to have any *visible* desyncs when replaying games, but get this warning
// virtually every replay, the assumption is our CRC checking is faulty. Since we're at the
Expand Down
Loading