mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +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.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@ -72,6 +73,9 @@ namespace osu.Game.Rulesets.Osu.UI
|
|||||||
if (!hitObjectCanBlockFutureHits(hitObject))
|
if (!hitObjectCanBlockFutureHits(hitObject))
|
||||||
return;
|
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);
|
var enumerator = new HitObjectEnumerator(hitObjectContainer, hitObject.HitObject.StartTime);
|
||||||
|
|
||||||
while (enumerator.MoveNext())
|
while (enumerator.MoveNext())
|
||||||
|
Loading…
Reference in New Issue
Block a user