From 714f55b6bc524432a83ee3d197ae4b969934f63e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 10 Sep 2021 14:36:32 +0900 Subject: [PATCH] Clone control points when copying to `HitObject`s --- osu.Game.Rulesets.Osu/Objects/Slider.cs | 1 - osu.Game/Rulesets/Objects/HitObject.cs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index 53ecb59c85..23b4f812c8 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -174,7 +174,6 @@ namespace osu.Game.Rulesets.Osu.Objects StartTime = e.Time, Position = Position, StackHeight = StackHeight, - SampleControlPoint = SampleControlPoint, }); break; diff --git a/osu.Game/Rulesets/Objects/HitObject.cs b/osu.Game/Rulesets/Objects/HitObject.cs index 49bcf7a10c..42a326da80 100644 --- a/osu.Game/Rulesets/Objects/HitObject.cs +++ b/osu.Game/Rulesets/Objects/HitObject.cs @@ -108,13 +108,13 @@ namespace osu.Game.Rulesets.Objects var legacyInfo = controlPointInfo as LegacyControlPointInfo; if (legacyInfo != null) - DifficultyControlPoint = legacyInfo.DifficultyPointAt(StartTime); + DifficultyControlPoint = (DifficultyControlPoint)legacyInfo.DifficultyPointAt(StartTime).DeepClone(); ApplyDefaultsToSelf(controlPointInfo, difficulty); // This is done here after ApplyDefaultsToSelf as we may require custom defaults to be applied to have an accurate end time. if (legacyInfo != null) - SampleControlPoint = legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency); + SampleControlPoint = (SampleControlPoint)legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency).DeepClone(); nestedHitObjects.Clear();