mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
-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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user