additional revision made after pr was pulled internally

Co-authored-by: Hyper_ <40342021+NotHyper-474@users.noreply.github.com>
This commit is contained in:
Abnormal
2025-06-11 02:52:05 -06:00
committed by Hundrec
co-authored by Hyper_
parent 55221646b8
commit 5d4e1d276b
+6 -3
View File
@@ -1366,13 +1366,16 @@ class PlayState extends MusicBeatSubState
musicPausedBySubState = true;
}
// Pause any sounds that are playing and keep track of them.
// Pause any sounds that are playing and keep track of them.Add commentMore actions
// Vocals are also paused here but are not included as they are handled separately.
if (Std.isOfType(subState, PauseSubState))
{
FlxG.sound.list.forEachAlive(function(sound:FlxSound) {
// The need to check for time is obligatory because of scheduled sounds
if (!sound.active || sound == FlxG.sound.music || (!sound.playing && sound.time >= 0)) return;
if (!sound.active || sound == FlxG.sound.music) return;
// In case it's a scheduled sound
var funkinSound:FunkinSound = cast sound;
if (funkinSound != null && !funkinSound.isPlaying) return;
if (!sound.playing && sound.time >= 0) return;
sound.pause();
soundsPausedBySubState.add(sound);
});