From 727400ff278476365670221f319a03bb2b49e404 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 95829e2d..09ff4c49 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -231,9 +231,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 @@ -243,6 +240,8 @@ void musicclass::play(int t) } else { + m_doFadeInVol = false; + m_doFadeOutVol = false; musicVolume = MIX_MAX_VOLUME; Mix_VolumeMusic(musicVolume); } @@ -271,6 +270,8 @@ void musicclass::play(int t) } else { + m_doFadeInVol = false; + m_doFadeOutVol = false; fadeMusicVolumeIn(3000); } }