Skip to content

Commit 8b5ed7d

Browse files
authored
[ZH] Revert fix for uninitialized cellBounds in Pathfinder::classifyFence() for VC6 builds to avoid mismatching with Retail (#1075)
1 parent af97104 commit 8b5ed7d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4032,8 +4032,12 @@ void Pathfinder::classifyFence( Object *obj, Bool insert )
40324032
IRegion2D cellBounds;
40334033
cellBounds.lo.x = REAL_TO_INT_FLOOR((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
40344034
cellBounds.lo.y = REAL_TO_INT_FLOOR((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
4035+
// TheSuperHackers @fix Mauller 16/06/2025 Fixes uninitialized variables.
4036+
// To keep retail compatibility they need to be uninitialized in VC6 builds.
4037+
#if !(defined(_MSC_VER) && _MSC_VER < 1300)
40354038
cellBounds.hi.x = REAL_TO_INT_CEIL((pos->x + 0.5f)/PATHFIND_CELL_SIZE_F);
40364039
cellBounds.hi.y = REAL_TO_INT_CEIL((pos->y + 0.5f)/PATHFIND_CELL_SIZE_F);
4040+
#endif
40374041
Bool didAnything = false;
40384042

40394043
for (Int iy = 0; iy < numStepsY; ++iy, tl_x += ydx, tl_y += ydy)

0 commit comments

Comments
 (0)