mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-03-13 16:43:57 -04:00
don't try to resync vocals after vocals already ended or song fading out
This commit is contained in:
parent
10bb5d8a30
commit
729d48707d
1 changed files with 11 additions and 1 deletions
|
@ -62,6 +62,7 @@ class PlayState extends MusicBeatState
|
|||
var halloweenLevel:Bool = false;
|
||||
|
||||
private var vocals:FlxSound;
|
||||
private var vocalsFinished:Bool = false;
|
||||
|
||||
private var dad:Character;
|
||||
private var gf:Character;
|
||||
|
@ -1156,6 +1157,9 @@ class PlayState extends MusicBeatState
|
|||
else
|
||||
vocals = new FlxSound();
|
||||
|
||||
vocals.onComplete = function(){
|
||||
vocalsFinished = true;
|
||||
};
|
||||
FlxG.sound.list.add(vocals);
|
||||
|
||||
notes = new FlxTypedGroup<Note>();
|
||||
|
@ -1440,10 +1444,16 @@ class PlayState extends MusicBeatState
|
|||
|
||||
function resyncVocals():Void
|
||||
{
|
||||
vocals.pause();
|
||||
if (_exiting)
|
||||
return ;
|
||||
|
||||
vocals.pause();
|
||||
FlxG.sound.music.play();
|
||||
Conductor.songPosition = FlxG.sound.music.time;
|
||||
|
||||
if (vocalsFinished)
|
||||
return ;
|
||||
|
||||
vocals.time = Conductor.songPosition;
|
||||
vocals.play();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue