tr2/inventory: fix level number for play any level
Some checks are pending
Run code linters / Run code linters (push) Waiting to run
Publish a pre-release / Build TR1 (push) Has been skipped
Publish a pre-release / Build TR2 (push) Has been skipped
Publish a pre-release / Create a prerelease (push) Has been skipped

This increments the selected level to play only if there is a gym level
present.

Resolves #2560.
This commit is contained in:
lahm86 2025-02-27 19:44:56 +00:00
parent 7e4ceb62ed
commit 307daff7ad
2 changed files with 5 additions and 2 deletions

View file

@ -4,6 +4,7 @@
- fixed smashed windows blocking enemy pathing after loading a save (#2535)
- fixed a rare issue whereby Lara would be unable to move after disposing a flare (#2545, regression from 0.9)
- fixed flare pickups only adding one flare to Lara's inventory rather than six (#2551, regression from 0.9)
- fixed play any level causing the game to hang when no gym level is present (#2560, regression from 0.9)
## [0.9.2](https://github.com/LostArtefacts/TRX/compare/tr2-0.9.1...tr2-0.9.2) - 2025-02-19
- fixed secret rewards not handed out after loading a save (#2528, regression from 0.8)

View file

@ -203,7 +203,8 @@ static GF_COMMAND M_Finish(INV_RING *const ring, const bool apply_changes)
if (g_GameFlow.play_any_level) {
return (GF_COMMAND) {
.action = GF_START_GAME,
.param = g_Inv_ExtraData[1] + 1,
.param = g_Inv_ExtraData[1]
+ (GF_GetGymLevel() != nullptr ? 1 : 0),
};
} else {
if (apply_changes) {
@ -224,7 +225,8 @@ static GF_COMMAND M_Finish(INV_RING *const ring, const bool apply_changes)
if (g_GameFlow.play_any_level) {
return (GF_COMMAND) {
.action = GF_START_GAME,
.param = g_Inv_ExtraData[1] + 1,
.param = g_Inv_ExtraData[1]
+ (GF_GetGymLevel() != nullptr ? 1 : 0),
};
} else {
return (GF_COMMAND) {