mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Add fail-safe to ensure hittability after a hit
This commit is contained in:
parent
08df9d49e5
commit
a4a7823817
@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
@ -72,6 +73,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
if (!hitObjectCanBlockFutureHits(hitObject))
|
||||
return;
|
||||
|
||||
if (!IsHittable(hitObject, hitObject.HitObject.StartTime + hitObject.Result.TimeOffset))
|
||||
throw new InvalidOperationException($"A {hitObject} was hit before it become hittable!");
|
||||
|
||||
var enumerator = new HitObjectEnumerator(hitObjectContainer, hitObject.HitObject.StartTime);
|
||||
|
||||
while (enumerator.MoveNext())
|
||||
|
Loading…
Reference in New Issue
Block a user