Write out DifficultyControlPoints into HitObjects

This commit is contained in:
Dean Herbert 2021-08-31 16:16:53 +09:00
parent cdd0262ca1
commit b41b1e2394
2 changed files with 5 additions and 2 deletions

View File

@ -68,6 +68,8 @@ namespace osu.Game.Rulesets.Objects
public SampleControlPoint SampleControlPoint; public SampleControlPoint SampleControlPoint;
public DifficultyControlPoint DifficultyControlPoint;
/// <summary> /// <summary>
/// Whether this <see cref="HitObject"/> is in Kiai time. /// Whether this <see cref="HitObject"/> is in Kiai time.
/// </summary> /// </summary>
@ -110,10 +112,12 @@ namespace osu.Game.Rulesets.Objects
{ {
// This is done here since ApplyDefaultsToSelf may be used to determine the end time // This is done here since ApplyDefaultsToSelf may be used to determine the end time
SampleControlPoint = legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency); SampleControlPoint = legacyInfo.SamplePointAt(this.GetEndTime() + control_point_leniency);
DifficultyControlPoint = legacyInfo.DifficultyPointAt(StartTime);
} }
else else
{ {
SampleControlPoint ??= SampleControlPoint.DEFAULT; SampleControlPoint ??= SampleControlPoint.DEFAULT;
DifficultyControlPoint ??= DifficultyControlPoint.DEFAULT;
} }
nestedHitObjects.Clear(); nestedHitObjects.Clear();

View File

@ -43,9 +43,8 @@ namespace osu.Game.Rulesets.Objects.Legacy
base.ApplyDefaultsToSelf(controlPointInfo, difficulty); base.ApplyDefaultsToSelf(controlPointInfo, difficulty);
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(StartTime); 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; Velocity = scoringDistance / timingPoint.BeatLength;
} }