From 47c1c22ff78cb88e3c3ca5784bfb01330c4c7d5c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 27 Sep 2020 20:42:55 +0200 Subject: [PATCH] - do not stop the music in the cross-game level-end handler. Some maps require that it continues playing here. --- source/blood/src/endgame.cpp | 1 + source/core/mainloop.cpp | 1 - source/exhumed/src/gameloop.cpp | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blood/src/endgame.cpp b/source/blood/src/endgame.cpp index 37f0ea78f..4a62ce0c2 100644 --- a/source/blood/src/endgame.cpp +++ b/source/blood/src/endgame.cpp @@ -167,6 +167,7 @@ void GameInterface::LevelCompleted(MapRecord *map, int skill) { JobDesc job = { Create() }; sndStartSample(268, 128, -1, false, CHANF_UI); + Mus_Stop(); RunScreenJob(&job, 1, [=](bool) { soundEngine->StopAllChannels(); diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 63d554745..ab3172454 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -163,7 +163,6 @@ static void GameTicker() case ga_completed: FX_StopAllSounds(); FX_SetReverb(0); - Mus_Stop(); if (g_nextmap == currentLevel) { // if the same level is restarted, skip any progression stuff like summary screens or cutscenes. diff --git a/source/exhumed/src/gameloop.cpp b/source/exhumed/src/gameloop.cpp index 8f87432e1..8d6c8d08c 100644 --- a/source/exhumed/src/gameloop.cpp +++ b/source/exhumed/src/gameloop.cpp @@ -47,6 +47,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "core/menu/menu.h" #include "d_net.h" #include "automap.h" +#include "raze_music.h" BEGIN_PS_NS @@ -221,7 +222,8 @@ void GameInterface::NewGame(MapRecord *map, int skill) void GameInterface::LevelCompleted(MapRecord *map, int skill) { - if (currentLevel->levelNumber == 0) gameaction = ga_mainmenu; + Mus_Stop(); + if (currentLevel->levelNumber == 0) gameaction = ga_mainmenu; else Intermission(currentLevel, map); }