tr2/gun: fix drawing flare during pickup

This prevents Lara gaining a free flare during the pickup animation.

Resolves #2123.
This commit is contained in:
lahm86 2024-12-26 19:27:38 +00:00
parent 4babf59330
commit dd3f977e5c
7 changed files with 18 additions and 1 deletions

View file

@ -5,6 +5,7 @@
- added an option to allow disabling the developer console (#2063)
- 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)
- 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

@ -27,6 +27,7 @@ game with new enhancements and features.
- added optional fixes for the following gameplay glitches:
- QWOP animation
- step bug
- free flare from underwater pickup
- 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

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

View file

@ -2,6 +2,7 @@ CFG_BOOL(g_Config, gameplay.fix_m16_accuracy, true)
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_floor_data_issues, true)
CFG_BOOL(g_Config, gameplay.fix_flare_throw_priority, true)
CFG_BOOL(g_Config, gameplay.enable_cheats, false)

View file

@ -1,5 +1,6 @@
#include "game/gun/gun.h"
#include "config.h"
#include "decomp/flares.h"
#include "game/gun/gun_misc.h"
#include "game/gun/gun_pistols.h"
@ -30,7 +31,10 @@ void Gun_Control(void)
} else if (g_InputDB.use_flare) {
if (g_Lara.gun_type == LGT_FLARE) {
g_Lara.gun_status = LGS_UNDRAW;
} else if (Inv_RequestItem(O_FLARES_ITEM)) {
} else if (
Inv_RequestItem(O_FLARES_ITEM)
&& (!g_Config.gameplay.fix_free_flare_glitch
|| g_LaraItem->current_anim_state != LS_PICKUP)) {
g_Lara.request_gun_type = LGT_FLARE;
}
}

View file

@ -50,6 +50,10 @@
"Title": "Fix step glitch",
"Description": "Fixes Lara sometimes being pushed into walls adjacent to steps when running up them in a specific way."
},
"fix_free_flare_glitch": {
"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_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

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