Fix nested hitobjects not updating

This commit is contained in:
smoogipoo
2019-12-06 20:53:40 +09:00
parent 41437242a2
commit b9d12e5fe4
2 changed files with 37 additions and 4 deletions

View File

@ -116,7 +116,23 @@ namespace osu.Game.Rulesets.Catch.Objects
public double Duration => EndTime - StartTime;
public SliderPath Path { get; set; }
private readonly SliderPath path = new SliderPath(new[] { new PathControlPoint { Type = { Value = PathType.Linear } } });
public SliderPath Path
{
get => path;
set
{
path.ControlPoints.Clear();
path.ExpectedDistance.Value = null;
if (value != null)
{
path.ControlPoints.AddRange(value.ControlPoints);
path.ExpectedDistance.Value = value.ExpectedDistance.Value;
}
}
}
public double Distance => Path.Distance;