Fix combo bindings not being bound to nested hitobjects

This commit is contained in:
smoogipoo
2019-09-26 17:39:19 +09:00
parent ea76dd6a9e
commit 45f2bcc440
3 changed files with 10 additions and 46 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using Newtonsoft.Json;
using osu.Game.Audio;
@ -82,6 +83,15 @@ namespace osu.Game.Rulesets.Objects
CreateNestedHitObjects();
if (this is IHasComboInformation hasCombo)
{
foreach (var n in NestedHitObjects.OfType<IHasComboInformation>())
{
n.ComboIndexBindable.BindTo(hasCombo.ComboIndexBindable);
n.IndexInCurrentComboBindable.BindTo(hasCombo.IndexInCurrentComboBindable);
}
}
nestedHitObjects.Sort((h1, h2) => h1.StartTime.CompareTo(h2.StartTime));
foreach (var h in nestedHitObjects)