1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Use MaxValue instead of PositiveInfinity

This commit is contained in:
Dean Herbert 2017-09-19 21:39:17 +09:00
parent d192c2d83b
commit c88b0784da

View File

@ -184,7 +184,7 @@ namespace osu.Game.Rulesets.Catch.UI
float distance = fruit.DrawSize.X / 2 * fruit.Scale.X;
while (caughtFruit.Any(f => f.LifetimeEnd == double.PositiveInfinity && Vector2Extensions.DistanceSquared(f.Position, fruit.Position) < distance * distance))
while (caughtFruit.Any(f => f.LifetimeEnd == double.MaxValue && Vector2Extensions.DistanceSquared(f.Position, fruit.Position) < distance * distance))
{
fruit.X += RNG.Next(-5, 5);
fruit.Y -= RNG.Next(0, 5);