Fix mania notelock crashing with overlapping hitwindows

This commit is contained in:
smoogipoo
2020-11-11 12:37:00 +09:00
parent 6593aac3f2
commit 1173ef0890
4 changed files with 26 additions and 3 deletions

View File

@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Mania.UI
/// <param name="hitObject">The <see cref="HitObject"/> that was hit.</param>
public void HandleHit(DrawableHitObject hitObject)
{
if (!IsHittable(hitObject, hitObject.HitObject.StartTime + hitObject.Result.TimeOffset))
if (hitObject.IsHit && !IsHittable(hitObject, hitObject.HitObject.StartTime + hitObject.Result.TimeOffset))
throw new InvalidOperationException($"A {hitObject} was hit before it became hittable!");
foreach (var obj in enumerateHitObjectsUpTo(hitObject.HitObject.StartTime))