Skip to content

Commit

Permalink
Stop sounds when starting new game
Browse files Browse the repository at this point in the history
Fixes potential crash when autoloading save after death. (Can at least happen in NUTS.WAD.) Thanks to odun on Discord!
  • Loading branch information
bradharding committed Jan 3, 2025
1 parent 0ef1464 commit b225c0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### DOOM Retro v5.6.1

* *DOOM Retro* now uses [*SDL v2.30.11*](https://github.com/libsdl-org/SDL/releases/tag/release-2.30.11) and [*SDL_image v2.8.4*](https://github.com/libsdl-org/SDL_image/releases/tag/release-2.8.4).
* Changes have been made to further improve the overall stability of *DOOM Retro*.
* Minor changes have been made to text that is output to the console.
* An error is no longer displayed when trying to load the *BFG Edition* of *DOOM II: Hell On Earth*.
* Weapons that use the [*MBF21*](https://doomwiki.org/wiki/MBF21)-compatible `A_ConsumeAmmo` code pointer no longer consume ammo when fired if infinite ammo is enabled using the `infiniteammo` CCMD.
Expand Down
2 changes: 2 additions & 0 deletions src/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,8 @@ void G_InitNew(skill_t skill, int ep, int map)
S_ResumeMusic();
}

S_StopSounds();

if (skill > sk_nightmare)
skill = sk_nightmare;

Expand Down

0 comments on commit b225c0e

Please sign in to comment.