-CTD fix in Tixa in function FindBestPath in PathaAi.cpp

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@334 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Lesh
2006-07-07 20:37:08 +00:00
parent a5a0dfd11a
commit 92b7bd8417
3 changed files with 14 additions and 5 deletions
+5 -2
View File
@@ -1228,8 +1228,11 @@ INT16 FindSpotMaxDistFromOpponents(SOLDIERTYPE *pSoldier)
// assume we have to stand up!
// use the min macro here to make sure we don't wrap the UINT8 to 255...
gubNPCAPBudget = gubNPCAPBudget = __min( gubNPCAPBudget, gubNPCAPBudget - GetAPsToChangeStance( pSoldier, ANIM_STAND ) );
// Lesh: for some reason this code still allows to wrap UINT8 at low values of gubNPCAPBudget
//gubNPCAPBudget = gubNPCAPBudget = __min( gubNPCAPBudget, gubNPCAPBudget - GetAPsToChangeStance( pSoldier, ANIM_STAND ) );
// Lesh: will be using this form
if ( gubNPCAPBudget > GetAPsToChangeStance( pSoldier, ANIM_STAND ) )
gubNPCAPBudget = gubNPCAPBudget - GetAPsToChangeStance( pSoldier, ANIM_STAND );
//NumMessage("Search Range = ",iSearchRange);
//NumMessage("gubNPCAPBudget = ",gubNPCAPBudget);