diff --git a/source/core/cheats.cpp b/source/core/cheats.cpp index 16b56dd86..be05af107 100644 --- a/source/core/cheats.cpp +++ b/source/core/cheats.cpp @@ -252,11 +252,11 @@ void ChangeLevel(MapRecord* map, int skill) // //--------------------------------------------------------------------------- -void DeferedStartGame(MapRecord* map, int skill) +void DeferedStartGame(MapRecord* map, int skill, bool nostopsound) { g_nextmap = map; g_nextskill = skill; - gameaction = ga_newgame; + gameaction = nostopsound? ga_newgamenostopsound : ga_newgame; } //--------------------------------------------------------------------------- diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index 67a5c738b..5a5bf85fa 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -56,7 +56,7 @@ int GetAutomapZoom(int gZoom); void DrawCrosshair(int deftile, int health, double xdelta, double ydelta, double scale, PalEntry color = 0xffffffff); void updatePauseStatus(); -void DeferedStartGame(MapRecord* map, int skill); +void DeferedStartGame(MapRecord* map, int skill, bool nostopsound = false); void ChangeLevel(MapRecord* map, int skill); void CompleteLevel(MapRecord* map); diff --git a/source/core/gamestate.h b/source/core/gamestate.h index 6072f8168..8a601e86b 100644 --- a/source/core/gamestate.h +++ b/source/core/gamestate.h @@ -41,7 +41,8 @@ enum gameaction_t : int ga_autosave, // autosave the game (for triggering a save from within the game.) ga_completed, // Level was exited. ga_nextlevel, // Actually start the next level. - ga_loadgamehidecon + ga_loadgamehidecon, + ga_newgamenostopsound, // start a new game }; extern gamestate_t gamestate; extern gameaction_t gameaction; diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 43524e7a2..b7ed6f5f6 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -187,8 +187,9 @@ static void GameTicker() break; case ga_newgame: - newGameStarted = true; FX_StopAllSounds(); + case ga_newgamenostopsound: + newGameStarted = true; FX_SetReverb(0); gi->FreeLevelData(); C_ClearMessages(); diff --git a/source/exhumed/src/d_menu.cpp b/source/exhumed/src/d_menu.cpp index 005f4aa0b..2174911c6 100644 --- a/source/exhumed/src/d_menu.cpp +++ b/source/exhumed/src/d_menu.cpp @@ -76,7 +76,7 @@ void GameInterface::QuitToTitle() bool GameInterface::StartGame(FNewGameStartup& gs) { auto map = FindMapByLevelNum(gs.Skill); // 0 is training, 1 is the regular game - the game does not have skill levels. - DeferedStartGame(map, 1); + DeferedStartGame(map, 1, true); return true; }