ensure song starts at starting bpm
works when start time isn't zero
This commit is contained in:
committed by
Mihai Alexandru
parent
21c16c3a50
commit
51eec4522e
@@ -5,6 +5,7 @@ import flixel.util.FlxSignal;
|
||||
import flixel.math.FlxMath;
|
||||
import funkin.data.song.SongData.SongTimeChange;
|
||||
import funkin.data.song.SongDataUtils;
|
||||
import funkin.play.PlayState;
|
||||
import funkin.save.Save;
|
||||
import funkin.util.TimerUtil.SongSequence;
|
||||
import haxe.Timer;
|
||||
@@ -113,6 +114,17 @@ class Conductor
|
||||
|
||||
if (currentTimeChange == null) return Constants.DEFAULT_BPM;
|
||||
|
||||
@:privateAccess
|
||||
if (PlayState.instance != null && PlayState.instance.startingSong)
|
||||
{
|
||||
for (i in 0...timeChanges.length)
|
||||
{
|
||||
if (PlayState.instance.startTimestamp >= timeChanges[i].timeStamp) currentTimeChange = timeChanges[i];
|
||||
|
||||
if (PlayState.instance.startTimestamp < timeChanges[i].timeStamp) break;
|
||||
}
|
||||
}
|
||||
|
||||
return currentTimeChange.bpm;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user