@@ -2338,15 +2338,26 @@ void GameLogic::processCommandList( CommandList *list )
23382338 }
23392339 else
23402340 {
2341- // DEBUG_LOG(("Comparing %d CRCs on frame %d", m_cachedCRCs.size(), m_frame));
2342- std::map<Int, UnsignedInt>::const_iterator crcIt = m_cachedCRCs.begin ();
2343- Int validatorCRC = crcIt->second ;
2344- // DEBUG_LOG(("Validator CRC from player %d is %8.8X", crcIt->first, validatorCRC));
2345- while (++crcIt != m_cachedCRCs.end ())
2341+ Bool hasReferenceCRC = FALSE ;
2342+ UnsignedInt referenceCRC = 0 ;
2343+
2344+ for (CachedCRCMap::const_iterator it = m_cachedCRCs.begin (); it != m_cachedCRCs.end (); ++it)
23462345 {
2347- Int validatedCRC = crcIt->second ;
2348- // DEBUG_LOG(("CRC to validate is from player %d: %8.8X", crcIt->first, validatedCRC));
2349- if (validatorCRC != validatedCRC)
2346+ // TheSuperHackers @bugfix Caball009 14/06/2026 Check if player is still connected,
2347+ // to avoid spurious mismatches at low CRC intervals, e.g. every frame.
2348+ if (!TheNetwork->isPlayerConnected (it->first ))
2349+ continue ;
2350+
2351+ const UnsignedInt crc = it->second ;
2352+
2353+ if (!hasReferenceCRC)
2354+ {
2355+ hasReferenceCRC = TRUE ;
2356+ referenceCRC = crc;
2357+ continue ;
2358+ }
2359+
2360+ if (referenceCRC != crc)
23502361 {
23512362 DEBUG_CRASH ((" CRC mismatch!" ));
23522363 sawCRCMismatch = TRUE ;
@@ -2359,7 +2370,7 @@ void GameLogic::processCommandList( CommandList *list )
23592370 {
23602371#ifdef DEBUG_LOGGING
23612372 DEBUG_LOG ((" CRC Mismatch - saw %d CRCs from %d players" , m_cachedCRCs.size (), numPlayers));
2362- for (std::map<Int, UnsignedInt> ::const_iterator crcIt = m_cachedCRCs.begin (); crcIt != m_cachedCRCs.end (); ++crcIt)
2373+ for (CachedCRCMap ::const_iterator crcIt = m_cachedCRCs.begin (); crcIt != m_cachedCRCs.end (); ++crcIt)
23632374 {
23642375 Player *player = ThePlayerList->getNthPlayer (crcIt->first );
23652376 DEBUG_LOG ((" CRC from player %d (%ls) = %X" , crcIt->first ,
0 commit comments