From 688c594ef19958c1a0b69fe40a2e6e7de2a8366b Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Sun, 6 Mar 2022 11:39:05 -0500 Subject: [PATCH] Smol fix for Wizard's Waltz --- Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs index b9dd1dff7..29fce381a 100644 --- a/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs +++ b/Assets/Scripts/Games/WizardsWaltz/WizardsWaltz.cs @@ -38,9 +38,11 @@ namespace RhythmHeavenMania.Games.WizardsWaltz { List starts = GameManager.instance.Beatmap.entities.FindAll(c => c.datamodel == "wizardsWaltz/start interval").Select(c => c.beat).ToList(); - var nextInterval = starts.IndexOf(Mathp.GetClosestInList(starts, Conductor.instance.songPositionInBeats)); - wizardBeatOffset = starts[nextInterval]; - Debug.Log(wizardBeatOffset); + if (starts.Count > 0) + { + var nextInterval = starts.IndexOf(Mathp.GetClosestInList(starts, Conductor.instance.songPositionInBeats)); + wizardBeatOffset = starts[nextInterval]; + } } private void Update()