From 70d3c999bec33923e906172d043b3a83816f16ba Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 3 Sep 2021 16:38:34 -0700 Subject: [PATCH] Only reset fade booleans when music is actually played Otherwise, the block that fades existing music out if m_doFadeOutVol is true will never execute, because m_doFadeOutVol would always be false! --- desktop_version/src/Music.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 7fdcbadd..79fefa03 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -202,9 +202,6 @@ void musicclass::play(int t) return; } - m_doFadeInVol = false; - m_doFadeOutVol = false; - if (currentsong == 0 || currentsong == 7 || (!map.custommode && (currentsong == 0+num_mmmmmm_tracks || currentsong == 7+num_mmmmmm_tracks))) { // Level Complete theme, no fade in or repeat @@ -214,6 +211,8 @@ void musicclass::play(int t) } else { + m_doFadeInVol = false; + m_doFadeOutVol = false; musicVolume = MIX_MAX_VOLUME; Mix_VolumeMusic(musicVolume); } @@ -242,6 +241,8 @@ void musicclass::play(int t) } else { + m_doFadeInVol = false; + m_doFadeOutVol = false; fadeMusicVolumeIn(3000); } }