tr2/objects/general/pickup: fix underwater pickup drift

Fixes Lara drifting when collecting underwater pickups to avoid pushing
her into walls.

Resolves #2096.
This commit is contained in:
lahm86 2024-12-26 19:59:41 +00:00
parent dd3f977e5c
commit f4eaeee8d8
7 changed files with 16 additions and 0 deletions

View file

@ -6,6 +6,7 @@
- added an optional fix for the QWOP glitch (#2122)
- added an optional fix for the step glitch, where Lara can be pushed into walls (#2124)
- 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)
- fixed Lara prioritising throwing a spent flare while mid-air, so to avoid missing ledge grabs (#1989)
- fixed software renderer not applying underwater tint (#2066, regression from 0.7)
- fixed some enemies not looking at Lara (#2080, regression from 0.6)

View file

@ -28,6 +28,7 @@ game with new enhancements and features.
- QWOP animation
- step bug
- free flare from underwater pickup
- drifting into walls during underwater pickups
- changed inventory to pause the music rather than muting it
- fixed killing the T-Rex with a grenade launcher crashing the game
- fixed secret rewards not displaying shotgun ammo

View file

@ -34,6 +34,7 @@ typedef struct {
bool fix_qwop_glitch;
bool fix_step_glitch;
bool fix_free_flare_glitch;
bool fix_pickup_drift_glitch;
bool fix_floor_data_issues;
bool fix_flare_throw_priority;
bool enable_cheats;

View file

@ -3,6 +3,7 @@ CFG_BOOL(g_Config, gameplay.fix_item_duplication_glitch, false)
CFG_BOOL(g_Config, gameplay.fix_qwop_glitch, false)
CFG_BOOL(g_Config, gameplay.fix_step_glitch, false)
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_floor_data_issues, true)
CFG_BOOL(g_Config, gameplay.fix_flare_throw_priority, true)
CFG_BOOL(g_Config, gameplay.enable_cheats, false)

View file

@ -167,6 +167,9 @@ static void M_DoUnderwater(const int16_t item_num, ITEM *const lara_item)
lara_item->goal_anim_state = LS_TREAD;
lara_item->current_anim_state = LS_FLARE_PICKUP;
} else {
if (g_Config.gameplay.fix_pickup_drift_glitch) {
lara_item->fall_speed = 0;
}
lara_item->goal_anim_state = LS_PICKUP;
do {
Lara_Animate(lara_item);

View file

@ -54,6 +54,10 @@
"Title": "Fix free flare glitch",
"Description": "Fixes the ability to spawn a free flare when pressing the flare input while picking up any item."
},
"fix_pickup_drift_glitch": {
"Title": "Fix underwater pickup glitch",
"Description": "Fixes Lara sometimes drifting when collecting underwater items, which can push her into walls."
},
"fix_flare_throw_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."

View file

@ -47,6 +47,11 @@
"DataType": "Bool",
"DefaultValue": false
},
{
"Field": "fix_pickup_drift_glitch",
"DataType": "Bool",
"DefaultValue": false
},
{
"Field": "fix_flare_throw_priority",
"DataType": "Bool",