Fixed a tiny issue that caused cutscenes to softlock (#1432)

This commit is contained in:
Karim Akra
2025-07-17 12:51:06 +03:00
committed by GitHub
parent c6e19c8512
commit 01428dd5cf
2 changed files with 3 additions and 4 deletions
+1 -1
Submodule assets updated: 91e8cd2d49...6b2ba11ee3
+2 -3
View File
@@ -1065,7 +1065,7 @@ class PlayState extends MusicBeatSubState
// This helps prevent a major bug where the level suddenly loops back to the start or middle.
if (Conductor.instance.songPosition >= (FlxG.sound.music.endTime ?? FlxG.sound.music.length))
{
if (mayPauseGame) endSong(skipEndingTransition);
if (mayPauseGame && !isSongEnd) endSong(skipEndingTransition);
}
}
@@ -3109,11 +3109,10 @@ class PlayState extends MusicBeatSubState
*/
public function endSong(rightGoddamnNow:Bool = false):Void
{
if (isSongEnd) return;
isSongEnd = true;
if (FlxG.sound.music != null) FlxG.sound.music.volume = 0;
vocals.volume = 0;
mayPauseGame = false;
isSongEnd = true;
// Prevent ghost misses while the song is ending.
disableKeys = true;