mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fixed a pathing issue where a soldier would sometimes jump the wrong fence
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1034 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -7029,7 +7029,17 @@ void BeginSoldierClimbFence( SOLDIERTYPE *pSoldier )
|
||||
{
|
||||
INT8 bDirection;
|
||||
|
||||
if ( FindFenceJumpDirection( pSoldier, pSoldier->sGridNo, pSoldier->bDirection, &bDirection ) )
|
||||
// Make sure we hop the correct fence to follow our path!
|
||||
if (pSoldier->usPathIndex < pSoldier->usPathDataSize)
|
||||
{
|
||||
bDirection = (INT8) pSoldier->usPathingData[ pSoldier->usPathIndex];
|
||||
}
|
||||
else
|
||||
{
|
||||
bDirection = pSoldier->bDirection;
|
||||
}
|
||||
|
||||
if ( FindFenceJumpDirection( pSoldier, pSoldier->sGridNo, bDirection, &bDirection ) )
|
||||
{
|
||||
pSoldier->sTempNewGridNo = NewGridNo( (UINT16)pSoldier->sGridNo, (UINT16)DirectionInc(bDirection ) );
|
||||
pSoldier->fDontChargeTurningAPs = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user