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

Updated canMerge check to be totally accurate

This commit is contained in:
OliBomby 2022-08-30 00:18:55 +02:00
parent 2e5770be4e
commit 44916c51d7

View File

@ -452,6 +452,6 @@ namespace osu.Game.Rulesets.Osu.Edit
private bool canMerge(IReadOnlyList<OsuHitObject> objects) =>
objects.Count > 1
&& (objects.Any(h => h is Slider)
|| Precision.DefinitelyBigger(Vector2.DistanceSquared(objects[0].Position, objects[1].Position), 1));
|| objects.Zip(objects.Skip(1), (h1, h2) => Precision.DefinitelyBigger(Vector2.DistanceSquared(h1.Position, h2.Position), 1)).Any(x => x));
}
}