1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-14 12:47:21 +08:00

Prevent multiple invocations of failure procedure

This commit is contained in:
Dan Balasescu 2024-06-26 13:56:52 +09:00
parent 9039ec34ba
commit 0379abd714
No known key found for this signature in database

View File

@ -36,6 +36,9 @@ namespace osu.Game.Rulesets.Scoring
/// </summary>
public void TriggerFailure()
{
if (HasFailed)
return;
if (Failed?.Invoke() != false)
HasFailed = true;
}