Use `IndexInCurrentCombo`

This commit is contained in:
Henry Lin 2021-06-29 14:25:45 +08:00
parent 2722565204
commit 8d1eae7c70
1 changed files with 1 additions and 8 deletions

View File

@ -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)