mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:43:00 +08:00
Fix indices in beatmap not being transferred to children (and being off by one)
This commit is contained in:
parent
69b5d5606a
commit
5261579531
@ -34,12 +34,14 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
|
|
||||||
foreach (var obj in Beatmap.HitObjects.OfType<CatchHitObject>())
|
foreach (var obj in Beatmap.HitObjects.OfType<CatchHitObject>())
|
||||||
{
|
{
|
||||||
obj.IndexInBeatmap = index++;
|
obj.IndexInBeatmap = index;
|
||||||
foreach (var nested in obj.NestedHitObjects.OfType<CatchHitObject>())
|
foreach (var nested in obj.NestedHitObjects.OfType<CatchHitObject>())
|
||||||
nested.IndexInBeatmap = obj.IndexInBeatmap;
|
nested.IndexInBeatmap = index;
|
||||||
|
|
||||||
if (obj.LastInCombo && obj.NestedHitObjects.LastOrDefault() is IHasComboInformation lastNested)
|
if (obj.LastInCombo && obj.NestedHitObjects.LastOrDefault() is IHasComboInformation lastNested)
|
||||||
lastNested.LastInCombo = true;
|
lastNested.LastInCombo = true;
|
||||||
|
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList<Color4> comboColours)
|
protected override void UpdateComboColour(Color4 proposedColour, IReadOnlyList<Color4> comboColours)
|
||||||
{
|
{
|
||||||
// ignore the incoming combo colour as we use a custom lookup
|
// 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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user