1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:12:54 +08:00

Fixed tests failing

This commit is contained in:
Drison64 2022-09-20 19:45:39 +02:00
parent 6b1cd1bce3
commit a4fae37013

View File

@ -85,7 +85,7 @@ namespace osu.Game.Rulesets.Catch.Objects
AddNested(new TinyDroplet
{
StartTime = t + lastEvent.Value.Time,
X = EffectiveX + ClampToPlayField(Path.PositionAt(
X = ClampToPlayField(EffectiveX + Path.PositionAt(
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X),
});
}
@ -103,7 +103,7 @@ namespace osu.Game.Rulesets.Catch.Objects
{
Samples = dropletSamples,
StartTime = e.Time,
X = EffectiveX + ClampToPlayField(Path.PositionAt(e.PathProgress).X),
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
});
break;
@ -114,14 +114,14 @@ namespace osu.Game.Rulesets.Catch.Objects
{
Samples = this.GetNodeSamples(nodeIndex++),
StartTime = e.Time,
X = EffectiveX + ClampToPlayField(Path.PositionAt(e.PathProgress).X),
X = ClampToPlayField(EffectiveX + Path.PositionAt(e.PathProgress).X),
});
break;
}
}
}
public float EndX => EffectiveX + this.CurvePositionAt(1).X;
public float EndX => ClampToPlayField(EffectiveX + this.CurvePositionAt(1).X);
public float ClampToPlayField(float value) => Math.Clamp(value, 0, CatchPlayfield.WIDTH);