From 52615795313a3b90bbb9f82c5c74f0c76a7a25e5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Feb 2020 15:37:12 +0900 Subject: [PATCH] Fix indices in beatmap not being transferred to children (and being off by one) --- osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs | 6 ++++-- osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs index 1872d71532..1a5d0f983b 100644 --- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs +++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapProcessor.cs @@ -34,12 +34,14 @@ namespace osu.Game.Rulesets.Catch.Beatmaps foreach (var obj in Beatmap.HitObjects.OfType()) { - obj.IndexInBeatmap = index++; + obj.IndexInBeatmap = index; foreach (var nested in obj.NestedHitObjects.OfType()) - nested.IndexInBeatmap = obj.IndexInBeatmap; + nested.IndexInBeatmap = index; if (obj.LastInCombo && obj.NestedHitObjects.LastOrDefault() is IHasComboInformation lastNested) lastNested.LastInCombo = true; + + index++; } } diff --git a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs index fc5a8b2938..90ec250e29 100644 --- a/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs +++ b/osu.Game.Rulesets.Catch/Objects/Drawable/DrawableDroplet.cs @@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList 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]; } } }