From 406a19ceb6a5bf3a8fb2e918fa6f89610c1729a5 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 10 Sep 2021 15:46:14 -0700 Subject: [PATCH] Don't check `!muted` when fading music after completion prompt This was done in 2.2 and previous probably to fix the fact that there were multiple conflicting audio controls (the player wants to mute the audio but the game wants to fade in the audio), but is now actively harmful since 2.3, because muting the game while finishing the completion prompt means the music will never come back in, even after unmuting. I also notice that when collecting a custom crewmate, the game checks for the level's start music instead of if there's actually a current song playing right now. I don't know why this was done, because it would've been better to copy-paste the trinket collection logic here. It's entirely possible for the audio to just be muted and never come back if the level has no start music but plays a song by using a script. Anyways, leaving it alone because it's quite possible that a level might be intentionally designed around this, I can't really tell the intentions of every level creator, and it's easy to work around (either don't use custom crewmates, which every modern level basically does nowadays, or just set the start music). --- desktop_version/src/Game.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index eb1743fc..cbc6b1cc 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -1888,7 +1888,10 @@ void Game::updatestate(void) advancetext = false; completestop = false; state = 0; - if(!muted && music.currentsong>-1) music.fadeMusicVolumeIn(3000); + if (music.currentsong > -1) + { + music.fadeMusicVolumeIn(3000); + } graphics.showcutscenebars = false; break; @@ -1951,7 +1954,10 @@ void Game::updatestate(void) } else { - if(!muted && ed.levmusic>0) music.fadeMusicVolumeIn(3000); + if (ed.levmusic > 0) + { + music.fadeMusicVolumeIn(3000); + } } graphics.showcutscenebars = false; break;