From 1de459d9b414180d5049cbf153266a8d6e00c227 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 31 Mar 2023 21:39:29 -0700 Subject: [PATCH] Fix nice fade variables persisting when they shouldn't This fixes a regression from 2.3 where the very beginning of A New Dimension isn't silent. A New Dimension's level music is set to Predestined Fate, but there is a script box the player touches right upon spawning that stops playing music. Then after the player ascends upwards, they touch a script box that plays Predestined Fate. But in 2.2 and before, the very beginning is silent due to the script box that stops music. However in 2.3, due to the changes made to playing music during a fade, the initial level music trying to play Predestined Fate during a music fadeout from the main menu resulted in Predestined Fate being stored in the nice fade variables, which kicked in after halting the music since halting didn't reset those variables. This resets those variables whenever music is halted, and now the beginning of A New Dimension is back to how it was in 2.2 and before. --- desktop_version/src/Music.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 796c7ef0..b0c77fbd 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -1032,6 +1032,8 @@ void musicclass::haltdasmusik(void) currentsong = -1; m_doFadeInVol = false; m_doFadeOutVol = false; + nicefade = false; + nicechange = -1; } void musicclass::silencedasmusik(void)