- Bugfix: Fixed CTD that could occur on enemy soldier pathing

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4466 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-05-31 19:03:21 +00:00
parent 68757bfda0
commit 6b72751538
+7
View File
@@ -4352,6 +4352,13 @@ INT32 PlotPath( SOLDIERTYPE *pSold, INT32 sDestGridNo, INT8 bCopyRoute, INT8 bPl
// We should reduce points for starting to run if first tile is a fence...
sTestGridNo = NewGridNo(pSold->sGridNo, DirectionInc( (UINT8)guiPathingData[0]));
// WANNE: Quickfix for wrong pathing data (direction). This fixes crash that could rarly occur
if ((UINT8)guiPathingData[0] > 7)
{
guiPathingData[0] = 0;
}
if ( gubWorldMovementCosts[ sTestGridNo ][ guiPathingData[0] ][ pSold->pathing.bLevel] == TRAVELCOST_FENCE )
{
if ( usMovementMode == RUNNING && pSold->usAnimState != RUNNING )