mirror of https://github.com/ppy/osu
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 @@ public override void PostProcess()
|
|||
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ private void load()
|
|||
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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue