1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:07:23 +08:00

Remove dead clamping code

`EffectiveX` is already defined as clamped
to `[0, CatchPlayfield.WIDTH]`.
This commit is contained in:
Bartłomiej Dach 2023-12-13 13:22:12 +01:00
parent 6320194e19
commit a6bf4cdb98
No known key found for this signature in database

View File

@ -44,7 +44,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
base.PostProcess();
ApplyPositionOffsets(Beatmap);
ApplyPositionClamping(Beatmap);
int index = 0;
@ -115,17 +114,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
initialiseHyperDash(beatmap);
}
public void ApplyPositionClamping(IBeatmap beatmap)
{
foreach (var obj in beatmap.HitObjects.OfType<CatchHitObject>())
{
if (obj.EffectiveX < 0)
obj.XOffset += Math.Abs(obj.EffectiveX);
else if (obj.EffectiveX > CatchPlayfield.WIDTH)
obj.XOffset += CatchPlayfield.WIDTH - obj.EffectiveX;
}
}
private static void applyHardRockOffset(CatchHitObject hitObject, ref float? lastPosition, ref double lastStartTime, LegacyRandom rng)
{
float offsetPosition = hitObject.OriginalX;