Long jump:

- change to stationary stance before jumping (fixes problems with jumping from moving animation)
- switch to standing animation before jumping if soldier is prone (allows to correctly jump from prone stance)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8921 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-01-14 17:40:33 +00:00
parent 32e8f9d4ff
commit e39158569b
+5 -2
View File
@@ -6217,8 +6217,12 @@ UINT32 UIHandleJumpOver( UI_EVENT *pUIEvent )
// Get direction to goto....
ubDirection = GetDirectionFromGridNo( usMapPos, pSoldier );
pSoldier->flags.fDontChargeTurningAPs = TRUE;
// sevenfm: if soldier is prone, change to standing
if (gAnimControl[pSoldier->usAnimState].ubEndHeight == ANIM_PRONE)
UIHandleSoldierStanceChange(pSoldier->ubID, ANIM_CROUCH);
// sevenfm: first change to stationary
pSoldier->SoldierGotoStationaryStance();
pSoldier->EVENT_SetSoldierDesiredDirection(ubDirection);
pSoldier->flags.fTurningUntilDone = TRUE;
// ATE: Reset flag to go back to prone...
@@ -6228,7 +6232,6 @@ UINT32 UIHandleJumpOver( UI_EVENT *pUIEvent )
else
pSoldier->usPendingAnimation = JUMP_OVER_BLOCKING_PERSON;
return( GAME_SCREEN );
}