From e005ac382c327f5205adedf1ab7803a884bf8f05 Mon Sep 17 00:00:00 2001 From: MtH Date: Mon, 19 Apr 2021 10:43:21 +0200 Subject: [PATCH] don't play game over music if already ending --- source/GameOverSubstate.hx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/GameOverSubstate.hx b/source/GameOverSubstate.hx index 86123283f..7d35b6f42 100644 --- a/source/GameOverSubstate.hx +++ b/source/GameOverSubstate.hx @@ -111,7 +111,8 @@ class GameOverSubstate extends MusicBeatSubstate FlxG.sound.play(Paths.sound('jeffGameover/jeffGameover-' + randomGameover), 1, false, null, true, function() { - FlxG.sound.music.fadeIn(4, 0.2, 1); + if (!isEnding) + FlxG.sound.music.fadeIn(4, 0.2, 1); }); } default: @@ -130,7 +131,8 @@ class GameOverSubstate extends MusicBeatSubstate private function coolStartDeath(?vol:Float = 1):Void { - FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol); + if (!isEnding) + FlxG.sound.playMusic(Paths.music('gameOver' + stageSuffix), vol); } override function beatHit()