Skip to content

Commit

Permalink
stats: fix game hanging if exited during stats or credits
Browse files Browse the repository at this point in the history
Resolves #1585.
  • Loading branch information
walkawayy committed Oct 30, 2024
1 parent b80a492 commit b8f5aa4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances (#1572)
- fixed grenades counting as double kills in the game statistics (#1560)
- fixed the ammo counter being hidden while a demo plays in NG+ (#1559)
- fixed the game hanging if exited during the level stats, credits, or final stats (#1585)

## [0.5](https://github.com/LostArtefacts/TRX/compare/afaf12a...tr2-0.5) - 2024-10-08
- added `/sfx` command
Expand Down
1 change: 1 addition & 0 deletions docs/tr2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ decompilation process. We recognize that there is much work to be done.
- fixed the dragon reviving itself after Lara removes the dagger in rare circumstances
- fixed grenades counting as double kills in the game statistics
- fixed the ammo counter being hidden while a demo plays in NG+
- fixed the game hanging if exited during the level stats, credits, or final stats

#### Visuals

Expand Down
8 changes: 8 additions & 0 deletions src/tr2/decomp/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ int32_t __cdecl LevelStats(const int32_t level_num)

Input_Update();

if (g_IsGameToExit) {
break;
}

if (g_GF_OverrideDir != (GAME_FLOW_DIR)-1) {
break;
}
Expand Down Expand Up @@ -369,6 +373,10 @@ int32_t __cdecl GameStats(const int32_t level_num)

Input_Update();

if (g_IsGameToExit) {
break;
}

if (g_GF_OverrideDir != (GAME_FLOW_DIR)-1) {
break;
}
Expand Down

0 comments on commit b8f5aa4

Please sign in to comment.