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

Move empty window check to bar error meter

It's not valid in the base `HitErrorMeter`, as the colour meter only
displays colour for a given judgement, so it is still valid to add new
items to it even if the hit window is 0, as misses are still possible.
This commit is contained in:
Bartłomiej Dach 2021-06-07 12:31:24 +02:00
parent 37d062c7cd
commit 0531c2dcd9
2 changed files with 3 additions and 11 deletions

View File

@ -214,7 +214,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
protected override void OnNewJudgement(JudgementResult judgement)
{
if (!judgement.IsHit)
if (!judgement.IsHit || judgement.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
return;
if (judgementsContainer.Count > max_concurrent_judgements)

View File

@ -32,15 +32,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
{
base.LoadComplete();
processor.NewJudgement += onNewJudgement;
}
private void onNewJudgement(JudgementResult result)
{
if (result.HitObject.HitWindows?.WindowFor(HitResult.Miss) == 0)
return;
OnNewJudgement(result);
processor.NewJudgement += OnNewJudgement;
}
protected abstract void OnNewJudgement(JudgementResult judgement);
@ -74,7 +66,7 @@ namespace osu.Game.Screens.Play.HUD.HitErrorMeters
base.Dispose(isDisposing);
if (processor != null)
processor.NewJudgement -= onNewJudgement;
processor.NewJudgement -= OnNewJudgement;
}
}
}