- Fix: when jumping over fences or sandbags, a merc was occasionally moved inside the structure.

- Fix: sandbags could only be jumped if their height was < 2. A structure with a .jsd-size of 1 barely offers protection, thus limiting the usefulness of sandbags. From now on, sandbags with a height of 2 can also be jumped. Note: This requires a changed sandbag.jsd in GameDir.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7931 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2015-07-24 21:20:17 +00:00
parent f4f124c7b0
commit 2ba4b77a84
5 changed files with 23 additions and 12 deletions
+8 -8
View File
@@ -958,15 +958,15 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
//CODE: BEGINHOPFENCE
// MOVE TWO FACGIN GRIDNOS
sNewGridNo = NewGridNo( pSoldier->sGridNo, (UINT16)( DirectionInc( pSoldier->ubDirection ) ) );
//ddd window{
if ( gubWorldMovementCosts[ sNewGridNo ][ (UINT8)pSoldier->pathing.usPathingData[ pSoldier->pathing.usPathIndex ] ][ pSoldier->pathing.bLevel ] == TRAVELCOST_FENCE )
sNewGridNo = NewGridNo( sNewGridNo, (UINT16)( DirectionInc( pSoldier->ubDirection ) ) );
//ddd window}
// Flugente: the old complicaed method relied on pSoldier->pathing.usPathingData to be filled correctly - which it often wasn't.
// This is unneccessary, as we've already filled sTempNewGridNo with the correct data
// we could fill sForcastGridno when initiating the jump, but lets keep this as a hook
if ( pSoldier->sTempNewGridNo != NOWHERE )
pSoldier->sForcastGridno = pSoldier->sTempNewGridNo;
else
// hey, it's better than nowhere
pSoldier->sForcastGridno = pSoldier->sGridNo;
//comm by ddd
//sNewGridNo = NewGridNo( sNewGridNo, (UINT16)( DirectionInc( pSoldier->ubDirection ) ) );
pSoldier->sForcastGridno = sNewGridNo;
break;