From d5e66ceb833ad15bafd2543208366cc204950b2d Mon Sep 17 00:00:00 2001 From: walkawayy <81546780+walkawayy@users.noreply.github.com> Date: Sat, 9 Dec 2023 23:27:58 -0500 Subject: [PATCH] inventory: fix deselecting passport in locked passport modes (#1109) Resolves #1108. --- CHANGELOG.md | 1 + src/game/inventory/inventory.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a83bdc08..d3d298d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - fixed Lara's meshes being swapped in the gym level when using the console to give guns (#1092) - fixed Midas's touch having unrestricted vertical range (#1094) - fixed flames not being drawn when Lara is on fire but leaves the room where she caught fire (#1106) +- fixed being able to deselect the passport in quick save, quick load, save crystal, and death modes (#1108) ## [3.0.4](https://github.com/LostArtefacts/TR1X/compare/3.0.3...3.0.4) - 2023-12-08 - fixed missiles damaging Lara when she is far beyond their damage range (#1090) diff --git a/src/game/inventory/inventory.c b/src/game/inventory/inventory.c index c1837afb2..9c2031c7b 100644 --- a/src/game/inventory/inventory.c +++ b/src/game/inventory/inventory.c @@ -359,7 +359,7 @@ static int32_t Inv_ConstructAndDisplay(int inv_mode) return GF_NOP; } - bool pass_mode_open = false; + bool passport_mode_ready = false; g_InvMode = inv_mode; int no_input_count = 0; @@ -501,7 +501,8 @@ static int32_t Inv_ConstructAndDisplay(int inv_mode) if ((g_InvMode == INV_SAVE_MODE || g_InvMode == INV_SAVE_CRYSTAL_MODE || g_InvMode == INV_LOAD_MODE || g_InvMode == INV_DEATH_MODE) - && !pass_mode_open) { + && !passport_mode_ready) { + g_Input = (INPUT_STATE) { 0 }; g_InputDB = (INPUT_STATE) { 0, .menu_confirm = 1 }; } @@ -549,8 +550,8 @@ static int32_t Inv_ConstructAndDisplay(int inv_mode) || g_InvMode == INV_SAVE_CRYSTAL_MODE || g_InvMode == INV_LOAD_MODE || g_InvMode == INV_DEATH_MODE) - && !pass_mode_open) { - pass_mode_open = true; + && !passport_mode_ready) { + passport_mode_ready = true; } g_OptionSelected = 0;