From 4885afccaf369d4459118550e559afb0c8b59b74 Mon Sep 17 00:00:00 2001 From: Detoria <44783518+theDetourist@users.noreply.github.com> Date: Thu, 25 Mar 2021 03:44:35 -0300 Subject: [PATCH] Quick fix for song not ending Simple callback that got deleted last commit now brought back. --- source/PlayState.hx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index cdbc079..0e4b495 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1131,6 +1131,8 @@ class PlayState extends MusicBeatState if (!paused) FlxG.sound.playMusic(Paths.inst(PlayState.SONG.song), 1, false); + + FlxG.sound.music.onComplete = endSong; vocals.play(); if (FlxG.save.data.songPosition) @@ -1878,14 +1880,9 @@ class PlayState extends MusicBeatState } if (FlxG.save.data.downscroll) - if(FlxG.save.data.noteSpeed != -1) - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(FlxG.save.data.noteSpeed, 2))); - else daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2))); + daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (-0.45 * FlxMath.roundDecimal(SONG.speed, 2))); else - if(FlxG.save.data.noteSpeed != -1) - daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(FlxG.save.data.noteSpeed, 2))); - else daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); - + daNote.y = (strumLine.y - (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SONG.speed, 2))); //trace(daNote.y); // WIP interpolation shit? Need to fix the pause issue // daNote.y = (strumLine.y - (songTime - daNote.strumTime) * (0.45 * PlayState.SONG.speed));