GRAY ITS WORKING NOW

This commit is contained in:
Yoshman29
2022-12-19 13:12:22 +01:00
parent 10a8cc4802
commit cd0edc8378
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -516,7 +516,7 @@ class PlayState extends MusicBeatState
FlxG.sound.music = inst;
FlxG.sound.music.play();
}
FlxG.sound.music.onComplete = endSong;
inst.onComplete = endSong;
vocals.play();
updateDiscordStatus();
+5 -4
View File
@@ -105,11 +105,12 @@ class Conductor
var curBPM:Float = song.bpm;
var totalSteps:Int = 0;
var totalPos:Float = 0;
for (i in 0...song.notes.length)
for (i=>notes in song.notes)
{
if(song.notes[i].changeBPM && song.notes[i].bpm != curBPM)
if (notes == null) continue;
if (notes.changeBPM && notes.bpm != curBPM)
{
curBPM = song.notes[i].bpm;
curBPM = notes.bpm;
var event:BPMChangeEvent = {
stepTime: totalSteps,
songTime: totalPos,
@@ -118,7 +119,7 @@ class Conductor
bpmChangeMap.push(event);
}
var deltaSteps:Int = song.notes[i].lengthInSteps;
var deltaSteps:Int = notes.lengthInSteps;
totalSteps += deltaSteps;
totalPos += ((60 / curBPM) * 1000 / 4) * deltaSteps;
}