Skip to content

Commit f5280c0

Browse files
committed
Fix uninitialized variables in VC6 builds and possible source of mismatches.
1 parent 8a9db21 commit f5280c0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,8 +3866,11 @@ 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 uninitialized in VC6 builds.
3870-
#if !(defined(_MSC_VER) && _MSC_VER < 1300)
3869+
// To keep retail compatibility they need to be set to 0 in VC6 builds.
3870+
#if RETAIL_COMPATIBLE_CRC
3871+
cellBounds.hi.x = 0;
3872+
cellBounds.hi.y = 0;
3873+
#else
38713874
cellBounds.hi.x = REAL_TO_INT_CEIL((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
38723875
cellBounds.hi.y = REAL_TO_INT_CEIL((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
38733876
#endif

0 commit comments

Comments
 (0)