Skip to content

Commit

Permalink
libtrx/console: fix play_level command action
Browse files Browse the repository at this point in the history
This sets the action for /play commands to GF_SELECT_GAME rather than
GF_START_GAME, so that resume info can be properly calculated.

Resolves #1861.
  • Loading branch information
lahm86 committed Nov 11, 2024
1 parent ff9502a commit 31aeefa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/tr1/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- fixed being able to shoot the scion multiple times if save/load is used while it blows up (#1819)
- fixed certain erroneous `/play` invocations resulting in duplicated error messages
- fixed Lara getting stuck in her hit animation if she is hit while mounting the boat or skidoo (#1606)
- fixed the `/play` console command resulting in Lara starting the target level without pistols (#1861, regression from 4.5)
- improved enemy item drops by supporting the TR2+ approach of having drops defined in level data (#1713)
- improved Italian localization for the Config Tool
- improved the injection approach for Lara's responsive jumping (#1823)
Expand Down
2 changes: 1 addition & 1 deletion src/libtrx/game/console/cmd/play_level.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static COMMAND_RESULT M_Entrypoint(const COMMAND_CONTEXT *const ctx)
matched:
if (level_to_load >= 0 && level_to_load < Gameflow_GetLevelCount()) {
Gameflow_OverrideCommand((GAMEFLOW_COMMAND) {
.action = GF_START_GAME,
.action = GF_SELECT_GAME,
.param = level_to_load,
});
Console_Log(GS(OSD_PLAY_LEVEL), Gameflow_GetLevelTitle(level_to_load));
Expand Down
1 change: 1 addition & 0 deletions src/tr2/game/gameflow/gameflow_new.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ void Gameflow_OverrideCommand(const GAMEFLOW_COMMAND command)
{
switch (command.action) {
case GF_START_GAME:
case GF_SELECT_GAME:
g_GF_OverrideDir = GFD_START_GAME | command.param;
break;
case GF_START_SAVED_GAME:
Expand Down

0 comments on commit 31aeefa

Please sign in to comment.