Improved AI path tweaks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8730 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2020-01-12 09:17:51 +00:00
parent 168f9b9f6d
commit 9c563c9c8a
+6 -3
View File
@@ -3842,14 +3842,17 @@ if(!GridNoOnVisibleWorldTile(iDestination))
newTotCost = curCost + nextCost;
// sevenfm: experimental path AI tweaks
// sevenfm: experimental path tweaks for AI
if (s->bTeam != gbPlayerNum &&
!(s->flags.uiStatusFlags & SOLDIER_BOXER) &&
!AreInMeanwhile() &&
IS_MERC_BODY_TYPE(s))
{
if (InGasSpot(s, newLoc, bLevel) ||
DeepWater(newLoc, bLevel) && (s->numFlanks == 0 || s->numFlanks >= MAX_FLANKS_RED))
if (InGasSpot(s, newLoc, bLevel))
{
nextCost += 40;
}
else if (DeepWater(newLoc, bLevel) && (s->numFlanks == 0 || s->numFlanks >= MAX_FLANKS_RED))
{
nextCost += 20;
}