tr2/lara/state: fix walk-run-jump breaking

This resets the jump lock when going from walking to running to fix
cases when previous RUN_START animations have been interrupted.

Resolves #1587.
This commit is contained in:
lahm86 2024-12-27 15:38:55 +00:00
parent 2136b07484
commit 022747f376
7 changed files with 17 additions and 0 deletions

View file

@ -8,6 +8,7 @@
- added an optional fix for drawing a free flare during the underwater pickup animation (#2123) - added an optional fix for drawing a free flare during the underwater pickup animation (#2123)
- added an optional fix for Lara drifting into walls when collecting underwater items (#2096) - added an optional fix for Lara drifting into walls when collecting underwater items (#2096)
- fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs (#1989) - fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs (#1989)
- fixed Lara at times not being able to jump immediately after going from her walking to running animation (#1587)
- fixed software renderer not applying underwater tint (#2066, regression from 0.7) - fixed software renderer not applying underwater tint (#2066, regression from 0.7)
- fixed some enemies not looking at Lara (#2080, regression from 0.6) - fixed some enemies not looking at Lara (#2080, regression from 0.6)
- fixed the camera getting stuck at the start of Home Sweet Home (#2129, regression from 0.7) - fixed the camera getting stuck at the start of Home Sweet Home (#2129, regression from 0.7)

View file

@ -53,6 +53,7 @@ game with new enhancements and features.
- fixed exiting the game with Alt+F4 not immediately working in cutscenes - fixed exiting the game with Alt+F4 not immediately working in cutscenes
- fixed a crash when trying to draw too many rooms at once - fixed a crash when trying to draw too many rooms at once
- fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs - fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs
- fixed Lara at times not being able to jump immediately after going from her walking to running animation
- fixed the following floor data issues: - fixed the following floor data issues:
- **Opera House**: fixed the trigger under item 203 to trigger it rather than item 204 - **Opera House**: fixed the trigger under item 203 to trigger it rather than item 204
- **Wreck of the Maria Doria**: fixed room 98 not having water - **Wreck of the Maria Doria**: fixed room 98 not having water

View file

@ -37,6 +37,7 @@ typedef struct {
bool fix_pickup_drift_glitch; bool fix_pickup_drift_glitch;
bool fix_floor_data_issues; bool fix_floor_data_issues;
bool fix_flare_throw_priority; bool fix_flare_throw_priority;
bool fix_walk_run_jump;
bool enable_cheats; bool enable_cheats;
bool enable_console; bool enable_console;
bool enable_fmv; bool enable_fmv;

View file

@ -6,6 +6,7 @@ CFG_BOOL(g_Config, gameplay.fix_free_flare_glitch, false)
CFG_BOOL(g_Config, gameplay.fix_pickup_drift_glitch, false) CFG_BOOL(g_Config, gameplay.fix_pickup_drift_glitch, false)
CFG_BOOL(g_Config, gameplay.fix_floor_data_issues, true) CFG_BOOL(g_Config, gameplay.fix_floor_data_issues, true)
CFG_BOOL(g_Config, gameplay.fix_flare_throw_priority, true) CFG_BOOL(g_Config, gameplay.fix_flare_throw_priority, true)
CFG_BOOL(g_Config, gameplay.fix_walk_run_jump, true)
CFG_BOOL(g_Config, gameplay.enable_cheats, false) CFG_BOOL(g_Config, gameplay.enable_cheats, false)
CFG_BOOL(g_Config, gameplay.enable_console, true) CFG_BOOL(g_Config, gameplay.enable_console, true)
CFG_BOOL(g_Config, gameplay.enable_fmv, true) CFG_BOOL(g_Config, gameplay.enable_fmv, true)

View file

@ -1,5 +1,6 @@
#include "game/lara/state.h" #include "game/lara/state.h"
#include "config.h"
#include "game/input.h" #include "game/input.h"
#include "game/inventory/backpack.h" #include "game/inventory/backpack.h"
#include "game/lara/control.h" #include "game/lara/control.h"
@ -60,6 +61,9 @@ void Lara_State_Walk(ITEM *item, COLL_INFO *coll)
} else if (g_Input.slow) { } else if (g_Input.slow) {
item->goal_anim_state = LS_WALK; item->goal_anim_state = LS_WALK;
} else { } else {
if (g_Config.gameplay.fix_walk_run_jump) {
m_JumpPermitted = true;
}
item->goal_anim_state = LS_RUN; item->goal_anim_state = LS_RUN;
} }
} else { } else {

View file

@ -62,6 +62,10 @@
"Title": "Fix flare throwing priority", "Title": "Fix flare throwing priority",
"Description": "Fixes Lara prioritising throwing a spent flare while in mid-air, which can lead to being unable to grab ledges." "Description": "Fixes Lara prioritising throwing a spent flare while in mid-air, which can lead to being unable to grab ledges."
}, },
"fix_walk_run_jump": {
"Title": "Fix walk-run-jump breaking",
"Description": "Fixes Lara at times not being able to jump immediately after going from her walking to running animation."
},
"fix_floor_data_issues": { "fix_floor_data_issues": {
"Title": "Fix floor data issues", "Title": "Fix floor data issues",
"Description": "Fixes original issues with floor data/triggers." "Description": "Fixes original issues with floor data/triggers."

View file

@ -32,6 +32,11 @@
"DataType": "Bool", "DataType": "Bool",
"DefaultValue": true "DefaultValue": true
}, },
{
"Field": "fix_walk_run_jump",
"DataType": "Bool",
"DefaultValue": true
},
{ {
"Field": "fix_floor_data_issues", "Field": "fix_floor_data_issues",
"DataType": "Bool", "DataType": "Bool",