From db081760498f616d80d2acbcea3cd945fa629dc1 Mon Sep 17 00:00:00 2001 From: Hiviexd Date: Sun, 17 Nov 2024 22:54:38 +0100 Subject: [PATCH] fix CI --- osu.Game.Rulesets.Taiko/Mods/TaikoModSimplifiedRhythm.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModSimplifiedRhythm.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModSimplifiedRhythm.cs index b316260752..c0a0c10b6b 100644 --- a/osu.Game.Rulesets.Taiko/Mods/TaikoModSimplifiedRhythm.cs +++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModSimplifiedRhythm.cs @@ -36,17 +36,16 @@ namespace osu.Game.Rulesets.Taiko.Mods { var taikoBeatmap = (TaikoBeatmap)beatmap; var controlPointInfo = taikoBeatmap.ControlPointInfo; - List toRemove = []; + List toRemove = new List(); // Snap conversions for rhythms - var snapConversions = new Dictionary() + var snapConversions = new Dictionary { { 8, 4 }, // 1/8 snap to 1/4 snap { 6, 4 }, // 1/6 snap to 1/4 snap { 3, 2 }, // 1/3 snap to 1/2 snap }; - double beatLength = controlPointInfo.TimingPointAt(0).BeatLength; int patternStartIndex = 0; bool inPattern = false; @@ -63,6 +62,7 @@ namespace osu.Game.Rulesets.Taiko.Mods double snapValue = i < hits.Count - 1 ? getSnapBetweenNotes(controlPointInfo, hits[i], hits[i + 1]) : 1; // No next note, default to a safe 1/1 snap + if (snapValue == snapConversion.Key) { if (!inPattern) @@ -71,6 +71,7 @@ namespace osu.Game.Rulesets.Taiko.Mods } inPattern = true; } + // check if end of pattern or if we're on the last note if ((inPattern && snapValue != snapConversion.Key) || i == hits.Count) { @@ -95,7 +96,7 @@ namespace osu.Game.Rulesets.Taiko.Mods // 1/6 and 1/3: Adjust the second note and remove the third if (currentHitPosition % 3 == 1) { - hits[j].StartTime = hits[j - 1].StartTime + controlPointInfo.TimingPointAt(hits[j].StartTime).BeatLength / Convert.ToDouble(snapConversion.Value); + hits[j].StartTime = hits[j - 1].StartTime + (controlPointInfo.TimingPointAt(hits[j].StartTime).BeatLength / Convert.ToDouble(snapConversion.Value)); } else if (currentHitPosition % 3 == 2) {