mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +08:00
Clamped JuiceStream to Playfield, but broke few tests
This commit is contained in:
parent
32e4cf6ccb
commit
6b1cd1bce3
@ -11,6 +11,7 @@ using Newtonsoft.Json;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Rulesets.Catch.UI;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
@ -84,8 +85,8 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
AddNested(new TinyDroplet
|
||||
{
|
||||
StartTime = t + lastEvent.Value.Time,
|
||||
X = OriginalX + Path.PositionAt(
|
||||
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X,
|
||||
X = EffectiveX + ClampToPlayField(Path.PositionAt(
|
||||
lastEvent.Value.PathProgress + (t / sinceLastTick) * (e.PathProgress - lastEvent.Value.PathProgress)).X),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -102,7 +103,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
Samples = dropletSamples,
|
||||
StartTime = e.Time,
|
||||
X = OriginalX + Path.PositionAt(e.PathProgress).X,
|
||||
X = EffectiveX + ClampToPlayField(Path.PositionAt(e.PathProgress).X),
|
||||
});
|
||||
break;
|
||||
|
||||
@ -113,14 +114,16 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
Samples = this.GetNodeSamples(nodeIndex++),
|
||||
StartTime = e.Time,
|
||||
X = OriginalX + Path.PositionAt(e.PathProgress).X,
|
||||
X = EffectiveX + ClampToPlayField(Path.PositionAt(e.PathProgress).X),
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public float EndX => OriginalX + this.CurvePositionAt(1).X;
|
||||
public float EndX => EffectiveX + this.CurvePositionAt(1).X;
|
||||
|
||||
public float ClampToPlayField(float value) => Math.Clamp(value, 0, CatchPlayfield.WIDTH);
|
||||
|
||||
[JsonIgnore]
|
||||
public double Duration
|
||||
|
Loading…
Reference in New Issue
Block a user