1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 13:23:22 +08:00

Fix indices in beatmap not being transferred to children (and being off by one)

This commit is contained in:
Dean Herbert 2020-02-19 15:37:12 +09:00
parent 69b5d5606a
commit 5261579531
2 changed files with 5 additions and 3 deletions

View File

@ -34,12 +34,14 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
foreach (var obj in Beatmap.HitObjects.OfType<CatchHitObject>())
{
obj.IndexInBeatmap = index++;
obj.IndexInBeatmap = index;
foreach (var nested in obj.NestedHitObjects.OfType<CatchHitObject>())
nested.IndexInBeatmap = obj.IndexInBeatmap;
nested.IndexInBeatmap = index;
if (obj.LastInCombo && obj.NestedHitObjects.LastOrDefault() is IHasComboInformation lastNested)
lastNested.LastInCombo = true;
index++;
}
}

View File

@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList<Color4> comboColours)
{
// ignore the incoming combo colour as we use a custom lookup
AccentColour.Value = comboColours[HitObject.IndexInBeatmap % comboColours.Count];
AccentColour.Value = comboColours[(HitObject.IndexInBeatmap + 1) % comboColours.Count];
}
}
}