From 8d1eae7c705c95f159304b262f658348ce2c84c8 Mon Sep 17 00:00:00 2001 From: Henry Lin Date: Tue, 29 Jun 2021 14:25:45 +0800 Subject: [PATCH] Use `IndexInCurrentCombo` --- osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs b/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs index 62ca5e5fb4..78a49f8e91 100644 --- a/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs +++ b/osu.Game.Rulesets.Osu/Mods/OsuModRandom.cs @@ -48,8 +48,6 @@ public void ApplyToBeatmap(IBeatmap beatmap) float rateOfChangeMultiplier = 0; - int cntSinceNewCombo = 0; - for (int i = 0; i < hitObjects.Count; i++) { var hitObject = hitObjects[i]; @@ -58,12 +56,7 @@ public void ApplyToBeatmap(IBeatmap beatmap) // rateOfChangeMultiplier only changes every 5 iterations in a combo // to prevent shaky-line-shaped streams - if (hitObject.NewCombo) - cntSinceNewCombo = 0; - else - cntSinceNewCombo++; - - if (cntSinceNewCombo % 5 == 0) + if (hitObject.IndexInCurrentCombo % 5 == 0) rateOfChangeMultiplier = (float)rng.NextDouble() * 2 - 1; if (hitObject is Spinner)