Skip to content

Commit 292d2b9

Browse files
committed
Set values to numbers that are likely in the retail version.
1 parent f5280c0 commit 292d2b9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,10 +3866,13 @@ void Pathfinder::classifyFence( Object *obj, Bool insert )
38663866
cellBounds.lo.x = REAL_TO_INT_FLOOR((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
38673867
cellBounds.lo.y = REAL_TO_INT_FLOOR((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
38683868
// TheSuperHackers @fix Mauller 16/06/2025 Fixes uninitialized variables.
3869-
// To keep retail compatibility they need to be set to 0 in VC6 builds.
38703869
#if RETAIL_COMPATIBLE_CRC
3871-
cellBounds.hi.x = 0;
3872-
cellBounds.hi.y = 0;
3870+
//CRCDEBUG_LOG(("Pathfinder::classifyFence - (%d,%d)", cellBounds.hi.x, cellBounds.hi.y));
3871+
3872+
// In retail, the values in the stack often look like this. We set them
3873+
// to reduce the likelihood of mismatch.
3874+
cellBounds.hi.x = 253961804;
3875+
cellBounds.hi.y = 4202797;
38733876
#else
38743877
cellBounds.hi.x = REAL_TO_INT_CEIL((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
38753878
cellBounds.hi.y = REAL_TO_INT_CEIL((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);

0 commit comments

Comments
 (0)