From b41b1e239438de47012033fb11a523df35398e4e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 31 Aug 2021 16:16:53 +0900 Subject: [PATCH] Write out `DifficultyControlPoint`s into `HitObject`s --- osu.Game/Rulesets/Objects/HitObject.cs | 4 ++++ osu.Game/Rulesets/Objects/Legacy/ConvertSlider.cs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Rulesets/Objects/HitObject.cs b/osu.Game/Rulesets/Objects/HitObject.cs index c4b9e6e1ad..b540dc1b6e 100644 --- a/osu.Game/Rulesets/Objects/HitObject.cs +++ b/osu.Game/Rulesets/Objects/HitObject.cs @@ -68,6 +68,8 @@ namespace osu.Game.Rulesets.Objects public SampleControlPoint SampleControlPoint; + public DifficultyControlPoint DifficultyControlPoint; + /// /// Whether this is in Kiai time. /// @@ -110,10 +112,12 @@ namespace osu.Game.Rulesets.Objects { // This is done here since ApplyDefaultsToSelf may be used to determine the end time SampleControlPoint = legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency); + DifficultyControlPoint = legacyInfo.DifficultyPointAt(StartTime); } else { SampleControlPoint ??= SampleControlPoint.DEFAULT; + DifficultyControlPoint ??= DifficultyControlPoint.DEFAULT; } nestedHitObjects.Clear(); diff --git a/osu.Game/Rulesets/Objects/Legacy/ConvertSlider.cs b/osu.Game/Rulesets/Objects/Legacy/ConvertSlider.cs index df569b91c1..7e5914677a 100644 --- a/osu.Game/Rulesets/Objects/Legacy/ConvertSlider.cs +++ b/osu.Game/Rulesets/Objects/Legacy/ConvertSlider.cs @@ -43,9 +43,8 @@ namespace osu.Game.Rulesets.Objects.Legacy base.ApplyDefaultsToSelf(controlPointInfo, difficulty); TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); - DifficultyControlPoint difficultyPoint = controlPointInfo.DifficultyPointAt(StartTime); - double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * difficultyPoint.SpeedMultiplier; + double scoringDistance = base_scoring_distance * difficulty.SliderMultiplier * DifficultyControlPoint.SpeedMultiplier; Velocity = scoringDistance / timingPoint.BeatLength; }