diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp index 4b2626e74c5..c2927794824 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp @@ -3866,8 +3866,14 @@ void Pathfinder::classifyFence( Object *obj, Bool insert ) cellBounds.lo.x = REAL_TO_INT_FLOOR((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F); cellBounds.lo.y = REAL_TO_INT_FLOOR((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F); // TheSuperHackers @fix Mauller 16/06/2025 Fixes uninitialized variables. - // To keep retail compatibility they need to be uninitialized in VC6 builds. -#if !(defined(_MSC_VER) && _MSC_VER < 1300) +#if RETAIL_COMPATIBLE_CRC + //CRCDEBUG_LOG(("Pathfinder::classifyFence - (%d,%d)", cellBounds.hi.x, cellBounds.hi.y)); + + // In retail, the values in the stack often look like this. We set them + // to reduce the likelihood of mismatch. + cellBounds.hi.x = 253961804; + cellBounds.hi.y = 4202797; +#else cellBounds.hi.x = REAL_TO_INT_CEIL((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F); cellBounds.hi.y = REAL_TO_INT_CEIL((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F); #endif