Skip to content

Commit

Permalink
tr1/specific/s_shell: open console only if enabled by player
Browse files Browse the repository at this point in the history
This adds a check for whether or not the console has been enabled by
the player before opening it. Other game-driven console logging will
continue to display regardless.

Part of #2063.
  • Loading branch information
lahm86 committed Dec 17, 2024
1 parent c4506c8 commit 83e9c3f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/tr1/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- fixed camera positions in Return to Egypt and Temple of the Cat (#1317, regression from 4.1)
- fixed being able to see the flipmap in Natla's Mines when moving the boat (#2019)
- fixed an invisible wall in Temple of the Cat, due to a wrongly positioned door (#2021)
- fixed the `enable_console` config option not being adhered to (#2063, regression from 4.5)

## [4.6.1](https://github.com/LostArtefacts/TRX/compare/tr1-4.6...tr1-4.6.1) - 2024-11-25
- added ability to disable saves completely by setting the save slot to 0 (#1954)
Expand Down
3 changes: 2 additions & 1 deletion src/tr1/specific/s_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void S_Shell_SpinMessageLoop(void)
// but by the time Input_Update gets ran, we may already have lost
// some keypresses if the player types really fast, so we need to
// react sooner.
if (!FMV_IsPlaying() && !Console_IsOpened()
if (!FMV_IsPlaying() && g_Config.enable_console
&& !Console_IsOpened()
&& Input_IsPressed(
INPUT_BACKEND_KEYBOARD, g_Config.input.layout,
INPUT_ROLE_ENTER_CONSOLE)) {
Expand Down
2 changes: 1 addition & 1 deletion tools/tr1/config/TR1X_ConfigTool/Resources/Lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
},
"enable_console": {
"Title": "Console",
"Description": "Enables developer console."
"Description": "Enables the developer console."
},
"start_lara_hitpoints": {
"Title": "Lara's starting health",
Expand Down

0 comments on commit 83e9c3f

Please sign in to comment.