Skip to content

Commit dba1e2c

Browse files
committed
bugfix: Resolve a crash caused by an AI player not finding a valid Sneak Attack location
1 parent 02fdf4f commit dba1e2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,10 +1244,14 @@ Bool AIPlayer::computeSuperweaponTarget(const SpecialPowerTemplate *power, Coord
12441244
{
12451245
cash = curCash;
12461246
bestPos = pos;
1247+
success = true;
12471248
}
12481249
}
12491250
}
12501251

1252+
if (!success)
1253+
return false;
1254+
12511255
//Fine tune that position by looking at a even smaller radius.
12521256
Coord3D veryBestPos;
12531257
xCount = 11;

0 commit comments

Comments
 (0)