1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 08:12:56 +08:00

Add lenience to comparison

Noticed that they could still stack up on maps with hitcircles at the same point in time (centipede).
This commit is contained in:
Dean Herbert 2020-02-23 05:28:59 +09:00
parent e8ebb31517
commit 560cf21b12

View File

@ -214,11 +214,12 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
if (!judgement.IsHit)
return;
if (judgementsContainer.Count >= max_concurrent_judgements)
if (judgementsContainer.Count > max_concurrent_judgements)
{
const double quick_fade_time = 100;
var old = judgementsContainer.FirstOrDefault(j => j.LifetimeEnd > Clock.CurrentTime + quick_fade_time);
// check with a bit of lenience to avoid precision error in comparison.
var old = judgementsContainer.FirstOrDefault(j => j.LifetimeEnd > Clock.CurrentTime + quick_fade_time * 1.1);
if (old != null)
{