diff --git a/buildnumber.txt b/buildnumber.txt index c5803282..4a36de63 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -1878 \ No newline at end of file +1881 \ No newline at end of file diff --git a/source/funkin/system/Conductor.hx b/source/funkin/system/Conductor.hx index 916140ae..66205ecb 100644 --- a/source/funkin/system/Conductor.hx +++ b/source/funkin/system/Conductor.hx @@ -162,6 +162,8 @@ class Conductor #end } + private static var __timeUntilUpdate:Float; + private static var __elapsedAL:Float; private static function __updateSongPos(elapsed:Float) { if (FlxG.sound.music == null || !FlxG.sound.music.playing) { speed = destSpeed = 1; @@ -173,9 +175,9 @@ class Conductor var lastPos = lastSongPos; if (lastSongPos != (lastSongPos = FlxG.sound.music.time)) { // update conductor - var timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Main.time)); - var elapsedAL = (lastSongPos - lastPos); - destSpeed = FlxMath.bound(timeUntilUpdate / elapsedAL, 0.925, 1.075); + __timeUntilUpdate = -(lastSongPosTime - (lastSongPosTime = Main.time)); + __elapsedAL = (lastSongPos - lastPos); + destSpeed = FlxMath.bound(__elapsedAL / __timeUntilUpdate, 0.925, 1.075); songPosition = lastSongPos; } else { songPosition += elapsed * 1000 * speed;