This commit is contained in:
Overhaul
2007-06-29 10:40:05 +00:00
parent dc441a425d
commit e6024e5151
46 changed files with 4912 additions and 46 deletions
+7
View File
@@ -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