mirror of
https://github.com/ppy/osu.git
synced 2025-01-07 22:22:59 +08:00
Remove dead clamping code
`EffectiveX` is already defined as clamped to `[0, CatchPlayfield.WIDTH]`.
This commit is contained in:
parent
6320194e19
commit
a6bf4cdb98
@ -44,7 +44,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
base.PostProcess();
|
base.PostProcess();
|
||||||
|
|
||||||
ApplyPositionOffsets(Beatmap);
|
ApplyPositionOffsets(Beatmap);
|
||||||
ApplyPositionClamping(Beatmap);
|
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
@ -115,17 +114,6 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
initialiseHyperDash(beatmap);
|
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)
|
private static void applyHardRockOffset(CatchHitObject hitObject, ref float? lastPosition, ref double lastStartTime, LegacyRandom rng)
|
||||||
{
|
{
|
||||||
float offsetPosition = hitObject.OriginalX;
|
float offsetPosition = hitObject.OriginalX;
|
||||||
|
Loading…
Reference in New Issue
Block a user