mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1017 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -451,6 +451,10 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
INT8 bAPsLeft, fPathFlags;
|
||||
UINT8 ubRoomRequired = 0, ubTempRoom;
|
||||
|
||||
// 0verhaul: Make sure to clear the stored path since this always calculates a new one.
|
||||
// This is needed if the path cannot be found.
|
||||
pSoldier->bPathStored = FALSE;
|
||||
|
||||
if ( bReserveAPs == -1 )
|
||||
{
|
||||
// default reserve points
|
||||
@@ -539,6 +543,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
if ( CREATURE_OR_BLOODCAT( pSoldier ) )
|
||||
{
|
||||
// we tried to get close, failed; abort!
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return( NOWHERE );
|
||||
}
|
||||
else
|
||||
@@ -593,6 +598,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
AINumMessage("Couldn't find OK destination around grid #",sDesGrid);
|
||||
#endif
|
||||
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return(NOWHERE);
|
||||
}
|
||||
|
||||
@@ -739,6 +745,7 @@ INT16 InternalGoAsFarAsPossibleTowards(SOLDIERTYPE *pSoldier, INT16 sDesGrid, IN
|
||||
AIPopMessage(tempstr);
|
||||
#endif
|
||||
|
||||
pSoldier->usPathIndex = pSoldier->usPathDataSize = 0;
|
||||
return(NOWHERE); // then go nowhere
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user