From f90782d7123970215324ace99c55584ad78ca028 Mon Sep 17 00:00:00 2001 From: Til <89487150+TechnikTil@users.noreply.github.com> Date: Thu, 2 Jan 2025 07:07:20 -0700 Subject: [PATCH] make freeplay change bpm so stuff isnt out of sync (#514) --- source/funkin/menus/FreeplayState.hx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/funkin/menus/FreeplayState.hx b/source/funkin/menus/FreeplayState.hx index 96aab829d..ec9cbeb91 100644 --- a/source/funkin/menus/FreeplayState.hx +++ b/source/funkin/menus/FreeplayState.hx @@ -2,6 +2,7 @@ package funkin.menus; import funkin.backend.chart.Chart; import funkin.backend.chart.ChartData.ChartMetaData; +import funkin.backend.system.Conductor; import haxe.io.Path; import openfl.text.TextField; import flixel.text.FlxText; @@ -239,7 +240,11 @@ class FreeplayState extends MusicBeatState autoplayElapsed += elapsed; if (!disableAutoPlay && !songInstPlaying && (autoplayElapsed > timeUntilAutoplay || FlxG.keys.justPressed.SPACE)) { if (curPlayingInst != (curPlayingInst = Paths.inst(songs[curSelected].name, songs[curSelected].difficulties[curDifficulty]))) { - var huh:Void->Void = function() FlxG.sound.playMusic(curPlayingInst, 0); + var huh:Void->Void = function() + { + FlxG.sound.playMusic(curPlayingInst, 0); + Conductor.changeBPM(songs[curSelected].bpm, songs[curSelected].beatsPerMeasure, songs[curSelected].stepsPerBeat); + } if(!disableAsyncLoading) Main.execAsync(huh); else huh(); }