From 733428e7ee14bbcf29ca1b055d0f95d93f17746d Mon Sep 17 00:00:00 2001 From: NyxieFemboy <132237065+SenDoesStuff@users.noreply.github.com> Date: Mon, 10 Mar 2025 11:32:55 -0400 Subject: [PATCH] i hope i put this in the right place --- source/funkin/backend/system/Conductor.hx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/funkin/backend/system/Conductor.hx b/source/funkin/backend/system/Conductor.hx index 01281ef8..ab00f1a1 100644 --- a/source/funkin/backend/system/Conductor.hx +++ b/source/funkin/backend/system/Conductor.hx @@ -32,6 +32,8 @@ final class Conductor public static var onBeatHit:FlxTypedSignalVoid> = new FlxTypedSignal(); public static var onStepHit:FlxTypedSignalVoid> = new FlxTypedSignal(); public static var onBPMChange:FlxTypedSignal<(Float,Float)->Void> = new FlxTypedSignal(); + public static var onContinuousBPMChangeStart:FlxTypedSignal<(Float,Float)->Void> = new FlxTypedSignal(); + public static var onContinuousBPMChangeEnd:FlxTypedSignal<(Float,Float)->Void> = new FlxTypedSignal(); public static var onTimeSignatureChange:FlxTypedSignal<(Float,Float)->Void> = new FlxTypedSignal(); /** @@ -248,6 +250,7 @@ final class Conductor curChange.endStepTime = curChange.stepTime + params[1]; curChange.continuous = true; curChange.endSongTime = endTime; + onContinuousBPMChangeStart.dispatch(curChange.bpm, curChange.endSongTime); } return curChange; } @@ -329,6 +332,12 @@ final class Conductor if ((curChangeIndex = getTimeInChangeIndex(songPosition, curChangeIndex)) > 0) { var change = curChange; + + if (change.continuous && songPosition >= change.endSongTime) { + onContinuousBPMChangeEnd.dispatch(change.bpm, change.endSongTime); + change.continuous = false; //used to mark the current continuous change as 'ended' + } + curStepFloat = getTimeWithBPMInSteps(songPosition, curChangeIndex, getTimeWithIndexInBPM(songPosition, curChangeIndex)); curBeatFloat = change.beatTime + (curStepFloat - change.stepTime) / change.stepsPerBeat; curMeasureFloat = change.measureTime + (curBeatFloat - change.beatTime) / change.beatsPerMeasure;