Fix droplet position clamping

This commit is contained in:
ekrctb
2018-06-20 18:29:23 +09:00
parent 9d7e5b4920
commit 516b1c5495
2 changed files with 8 additions and 6 deletions

View File

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