From e39158569b73994a048edd3c69527d0ae429842e Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Thu, 14 Jan 2021 17:40:33 +0000 Subject: [PATCH] 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 --- Tactical/Handle UI.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index b4a0c29c..f8ac8bbd 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -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 ); }