mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 19:35:15 +08:00
Fix droplet position clamping
This commit is contained in:
parent
9d7e5b4920
commit
516b1c5495
@ -56,10 +56,12 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
|
|||||||
case JuiceStream juiceStream:
|
case JuiceStream juiceStream:
|
||||||
foreach (var nested in juiceStream.NestedHitObjects)
|
foreach (var nested in juiceStream.NestedHitObjects)
|
||||||
{
|
{
|
||||||
if (nested is TinyDroplet tinyDroplet)
|
var hitObject = (CatchHitObject)nested;
|
||||||
tinyDroplet.X = MathHelper.Clamp(tinyDroplet.X + rng.Next(-20, 20) / CatchPlayfield.BASE_WIDTH, 0, 1);
|
if (hitObject is TinyDroplet)
|
||||||
else if (nested is Droplet)
|
hitObject.X += rng.Next(-20, 20) / CatchPlayfield.BASE_WIDTH;
|
||||||
|
else if (hitObject is Droplet)
|
||||||
rng.Next(); // osu!stable retrieved a random droplet rotation
|
rng.Next(); // osu!stable retrieved a random droplet rotation
|
||||||
|
hitObject.X = MathHelper.Clamp(hitObject.X, 0, 1);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
AddNested(new TinyDroplet
|
AddNested(new TinyDroplet
|
||||||
{
|
{
|
||||||
StartTime = t,
|
StartTime = t,
|
||||||
X = MathHelper.Clamp(X + Curve.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH, 0, 1),
|
X = X + Curve.PositionAt(progress).X / CatchPlayfield.BASE_WIDTH,
|
||||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||||
{
|
{
|
||||||
Bank = s.Bank,
|
Bank = s.Bank,
|
||||||
@ -104,7 +104,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
AddNested(new Droplet
|
AddNested(new Droplet
|
||||||
{
|
{
|
||||||
StartTime = time,
|
StartTime = time,
|
||||||
X = MathHelper.Clamp(X + Curve.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH, 0, 1),
|
X = X + Curve.PositionAt(distanceProgress).X / CatchPlayfield.BASE_WIDTH,
|
||||||
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
Samples = new List<SampleInfo>(Samples.Select(s => new SampleInfo
|
||||||
{
|
{
|
||||||
Bank = s.Bank,
|
Bank = s.Bank,
|
||||||
@ -121,7 +121,7 @@ namespace osu.Game.Rulesets.Catch.Objects
|
|||||||
{
|
{
|
||||||
Samples = Samples,
|
Samples = Samples,
|
||||||
StartTime = spanStartTime + spanDuration,
|
StartTime = spanStartTime + spanDuration,
|
||||||
X = MathHelper.Clamp(X + Curve.PositionAt(reversed ? 0 : 1).X / CatchPlayfield.BASE_WIDTH, 0, 1)
|
X = X + Curve.PositionAt(reversed ? 0 : 1).X / CatchPlayfield.BASE_WIDTH
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user