From 34f875187c8eb00b0829fb75d22b8a9483fc3dc3 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Sep 2021 14:35:53 +0900 Subject: [PATCH] Copy time between `ControlPoint`s --- osu.Game/Beatmaps/ControlPoints/ControlPoint.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osu.Game/Beatmaps/ControlPoints/ControlPoint.cs b/osu.Game/Beatmaps/ControlPoints/ControlPoint.cs index 8203f2e968..4079a0cd5f 100644 --- a/osu.Game/Beatmaps/ControlPoints/ControlPoint.cs +++ b/osu.Game/Beatmaps/ControlPoints/ControlPoint.cs @@ -15,11 +15,9 @@ namespace osu.Game.Beatmaps.ControlPoints /// The time at which the control point takes effect. /// [JsonIgnore] - public double Time => controlPointGroup?.Time ?? 0; + public double Time { get; set; } - private ControlPointGroup controlPointGroup; - - public void AttachGroup(ControlPointGroup pointGroup) => controlPointGroup = pointGroup; + public void AttachGroup(ControlPointGroup pointGroup) => Time = pointGroup.Time; public int CompareTo(ControlPoint other) => Time.CompareTo(other.Time); @@ -46,6 +44,7 @@ namespace osu.Game.Beatmaps.ControlPoints public virtual void CopyFrom(ControlPoint other) { + Time = other.Time; } } }