mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- Fix: external iInitialMercArrivalLocation was overwritten by value from savegame
- Fix: gridno outside of map is used as valid map gridno git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8104 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -289,7 +289,7 @@ INT8 PointPatrolAI(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
sPatrolPoint = NextPatrolPoint(pSoldier);
|
||||
}
|
||||
while (( !TileIsOutOfBounds(sPatrolPoint)) && (NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel) < 1));
|
||||
while (( !TileIsOutOfBounds(sPatrolPoint)) && !NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel) );
|
||||
|
||||
// if we're back where we started, then ALL other patrol points are junk!
|
||||
if (pSoldier->sGridNo == sPatrolPoint)
|
||||
@@ -373,7 +373,7 @@ INT8 RandomPointPatrolAI(SOLDIERTYPE *pSoldier)
|
||||
sPatrolPoint = pSoldier->aiData.sPatrolGrid[ bPatrolIndex];
|
||||
bCnt++;
|
||||
}
|
||||
while ( (sPatrolPoint == pSoldier->sGridNo) || ( (!TileIsOutOfBounds(sPatrolPoint)) && (bCnt < pSoldier->aiData.bPatrolCnt) && (NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel ) < 1)) );
|
||||
while ( (sPatrolPoint == pSoldier->sGridNo) || ( (!TileIsOutOfBounds(sPatrolPoint)) && (bCnt < pSoldier->aiData.bPatrolCnt) && !NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel )) );
|
||||
|
||||
if (bCnt == pSoldier->aiData.bPatrolCnt)
|
||||
{
|
||||
@@ -383,7 +383,7 @@ INT8 RandomPointPatrolAI(SOLDIERTYPE *pSoldier)
|
||||
{
|
||||
sPatrolPoint = NextPatrolPoint(pSoldier);
|
||||
}
|
||||
while ((!TileIsOutOfBounds(sPatrolPoint)) && (NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel) < 1));
|
||||
while ((!TileIsOutOfBounds(sPatrolPoint)) && !NewOKDestination(pSoldier,sPatrolPoint,IGNOREPEOPLE, pSoldier->pathing.bLevel) );
|
||||
}
|
||||
|
||||
// do nothing this time around
|
||||
|
||||
Reference in New Issue
Block a user