From 890dfecbad130f3158b3e04945a2bb7e8f3ffaf0 Mon Sep 17 00:00:00 2001 From: Jenny Crowe Date: Sat, 5 Feb 2022 06:22:18 -0700 Subject: [PATCH] Fork Lifter: Zoom sound scheduling takes song speed into account. --- Assets/Scripts/Games/ForkLifter/Pea.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Games/ForkLifter/Pea.cs b/Assets/Scripts/Games/ForkLifter/Pea.cs index c62decbf..723e74ff 100644 --- a/Assets/Scripts/Games/ForkLifter/Pea.cs +++ b/Assets/Scripts/Games/ForkLifter/Pea.cs @@ -22,7 +22,8 @@ namespace RhythmHeavenMania.Games.ForkLifter // SCHEDULING zoom sound so it lines up with when it meets the fork. var currentDspTime = AudioSettings.dspTime; - var zoomStartTime = currentDspTime + (double)(Conductor.instance.secPerBeat * 2) - 0.317; + var cond = Conductor.instance; + var zoomStartTime = currentDspTime + (double)(cond.secPerBeat * 2 / cond.musicSource.pitch) - 0.317; Jukebox.PlayOneShotScheduledGame("forkLifter/zoomFast", (double)zoomStartTime); GetComponentInChildren().sprite = ForkLifter.instance.peaSprites[type];