Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lara: fix TR2 style walk-run-jump #937

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Aug 22, 2023

Resolves #934.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

This is the specific sequence to break walk-jun-jump.

  1. Enter Lara_State_Run; m_JumpPermitted is set to false
  2. Interrupt LA_RUN (anim 0) by rolling, for example; m_JumpPermitted is still false
  3. Enter Lara_State_Walk and release walk. The state changes here will link to WALK_TO_RUN_RIGHT (anim 4) or WALK_TO_RUN_LEFT (anim 5), depending on the frame.
  4. These interim animations link directly to LA_RUN (0), but link to frame 8 or 19. Their state IDs are the same as walk, so control remains in Lara_State_Walk until the state change is processed.
  5. m_JumpPermitted will remain false until the frame cycles round again to LF_JUMP_READY (4) - so 18 frames have to play out for WALK_TO_RUN_RIGHT or 7 frames for WALK_TO_RUN_LEFT.

The fix is to set m_JumpPermitted to true at step 3 above when walk is released. For any other situation, Lara will enter LA_RUN again from scratch, so the normal lock check will play out.

@lahm86 lahm86 added the TRX bug A bug with TRX label Aug 22, 2023
@lahm86 lahm86 added this to the 2.16 milestone Aug 22, 2023
@lahm86 lahm86 self-assigned this Aug 22, 2023
@lahm86 lahm86 requested review from rr- and walkawayy August 22, 2023 19:49
@lahm86 lahm86 merged commit 35394c2 into LostArtefacts:develop Aug 22, 2023
@lahm86 lahm86 deleted the issue-934-walk-run-jump branch August 22, 2023 20:08
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TR1 TRX bug A bug with TRX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

T1M bug: walk-run-jump animation can break
3 participants