mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Safeguard againts multiple ApplyResult() invocations
This commit is contained in:
@ -469,6 +469,9 @@ namespace osu.Game.Rulesets.Objects.Drawables
|
||||
/// <param name="application">The callback that applies changes to the <see cref="JudgementResult"/>.</param>
|
||||
protected void ApplyResult(Action<JudgementResult> application)
|
||||
{
|
||||
if (Result.HasResult)
|
||||
throw new InvalidOperationException($"Cannot apply result on a hitobject that already has a result.");
|
||||
|
||||
application?.Invoke(Result);
|
||||
|
||||
if (!Result.HasResult)
|
||||
|
Reference in New Issue
Block a user