File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
GeneralsMD/Code/GameEngine/Source/GameLogic/AI Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1812,6 +1812,16 @@ UnsignedInt PathfindCell::costSoFar( PathfindCell *parent )
1812
1812
Int numTurns = 0 ;
1813
1813
PathfindCell *prevCell = parent->getParentCell ();
1814
1814
if (prevCell) {
1815
+
1816
+ #if RETAIL_COMPATIBLE_PATHFINDING
1817
+ // TheSuperHackers @info this is a possible crash point in the retail pathfinding, we just prevent the crash at this point
1818
+ // External code should catch the issue in another block and cleanup the pathfinding before switching to the fixed pathfinding.
1819
+ if (!prevCell->hasInfo ())
1820
+ {
1821
+ return cost;
1822
+ }
1823
+ #endif
1824
+
1815
1825
ICoord2D dir;
1816
1826
dir.x = prevCell->getXIndex () - parent->getXIndex ();
1817
1827
dir.y = prevCell->getYIndex () - parent->getYIndex ();
You can’t perform that action at this time.
0 commit comments