From 86a16047ff5ae6f0afd72deebd9b2b51f3136ab8 Mon Sep 17 00:00:00 2001 From: SaracenOne Date: Fri, 25 Sep 2020 05:48:22 +0100 Subject: [PATCH] Fix for jump timing and buffering input during recover state (#275) * Make it so you engage jumps from the second frame rather than the forth to allow correct running jumps. Clear targetState at the beginning of the stop state to ensure alternative commands are not buffered during a recovery animation. * Fix roll cancelling and add special running to jump override specific for TR1 * Replace tabs with spaces. --- src/lara.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lara.h b/src/lara.h index 2b5df28..651be0d 100644 --- a/src/lara.h +++ b/src/lara.h @@ -4684,7 +4684,7 @@ struct Lara : Character { if (animIndex == ANIM_RUN_START) { canJump = false; } else if (animIndex == ANIM_RUN) { - if (frameIndex == 4) { + if (frameIndex == 4 || ((level->version & TR::VER_VERSION) == TR::VER_TR1)) { canJump = true; } } else { @@ -4709,6 +4709,8 @@ struct Lara : Character { return; } + targetState = STATE_STOP; + if ((input & (FORTH | ACTION)) == (FORTH | ACTION)) { c_angle(ANGLE_0); cinfo.radius = LARA_RADIUS + 4;