Skip to content

Commit

Permalink
inventory: fix deselecting passport in locked passport modes (LostArt…
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy authored Dec 10, 2023
1 parent 97992d9 commit d5e66ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions src/game/inventory/inventory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 };
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d5e66ce

Please sign in to comment.