Skip to content

Commit

Permalink
tr2/lara/state: fix surface to swim input check
Browse files Browse the repository at this point in the history
Before the input refactor, the check was (g_Input & LS_BACK) - LS_BACK
is a state, which happens to have the same value as IN_JUMP. So in the
refactor, it was converted to g_Input.back.

Resolves #1863.
  • Loading branch information
lahm86 committed Nov 11, 2024
1 parent 31aeefa commit 4ab0fdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased](https://github.com/LostArtefacts/TRX/compare/tr2-0.6...develop) - ××××-××-××
- added support for custom levels to enforce values for any config setting (#1846)
- fixed depth problems when drawing certain rooms (#1853, regression from 0.6)
- fixed being unable to go from surface swimming to underwater swimming without first stopping (#1863, regression from 0.6)

## [0.6](https://github.com/LostArtefacts/TRX/compare/tr2-0.5...tr2-0.6) - 2024-11-06
- added a fly cheat key (#1642)
Expand Down
2 changes: 1 addition & 1 deletion src/tr2/game/lara/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ void __cdecl Lara_State_SurfSwim(ITEM *item, COLL_INFO *coll)
} else if (g_Input.right) {
item->rot.y += LARA_SLOW_TURN;
}
if (!g_Input.forward || g_Input.back) {
if (!g_Input.forward || g_Input.jump) {
item->goal_anim_state = LS_SURF_TREAD;
}
item->fall_speed += 8;
Expand Down

0 comments on commit 4ab0fdd

Please sign in to comment.