Skip to content

Commit

Permalink
make freeplay change bpm so stuff isnt out of sync (#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechnikTil authored Jan 2, 2025
1 parent 7488485 commit f90782d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion source/funkin/menus/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit f90782d

Please sign in to comment.