1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 23:12:56 +08:00

Remove no longer necessary guards against default control points

The subscription in which the guards were present was moved from
constructor to `ApplyDefaults()`, and at that point neither the sample
control point or the difficulty point can be the default point, because
there are explicit paths that overwrite those with blank points in the
same methods, prior to the subscription's registration.

The only worry would be that someone would set the default point on the
object themselves, but at that point that is most likely programmer
error anyhow.
This commit is contained in:
Bartłomiej Dach 2022-01-11 22:12:23 +01:00
parent 7a25fe79b7
commit 80ccff9068
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -146,11 +146,8 @@ namespace osu.Game.Rulesets.Objects
foreach (var nested in nestedHitObjects)
nested.StartTime += offset;
if (DifficultyControlPoint != DifficultyControlPoint.DEFAULT)
DifficultyControlPoint.Time = time.NewValue;
if (SampleControlPoint != SampleControlPoint.DEFAULT)
SampleControlPoint.Time = this.GetEndTime() + control_point_leniency;
DifficultyControlPoint.Time = time.NewValue;
SampleControlPoint.Time = this.GetEndTime() + control_point_leniency;
};
DefaultsApplied?.Invoke(this);