mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user