1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 19:52:55 +08:00

Clone control points when copying to HitObjects

This commit is contained in:
Dean Herbert 2021-09-10 14:36:32 +09:00
parent 34f875187c
commit 714f55b6bc
2 changed files with 2 additions and 3 deletions

View File

@ -174,7 +174,6 @@ namespace osu.Game.Rulesets.Osu.Objects
StartTime = e.Time,
Position = Position,
StackHeight = StackHeight,
SampleControlPoint = SampleControlPoint,
});
break;

View File

@ -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();