Clamp juice stream position

This commit is contained in:
ekrctb
2018-06-20 17:23:55 +09:00
parent 2ff7b4cdcf
commit 9d7e5b4920
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
foreach (var nested in juiceStream.NestedHitObjects)
{
if (nested is TinyDroplet tinyDroplet)
tinyDroplet.X += rng.Next(-20, 20) / CatchPlayfield.BASE_WIDTH;
tinyDroplet.X = MathHelper.Clamp(tinyDroplet.X + rng.Next(-20, 20) / CatchPlayfield.BASE_WIDTH, 0, 1);
else if (nested is Droplet)
rng.Next(); // osu!stable retrieved a random droplet rotation
}