1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Ensure fail animation sequence isn't run after the player exit sequence has started

This commit is contained in:
Dean Herbert 2022-08-25 14:26:42 +09:00
parent 4c45f7d938
commit 8f4a953d11

View File

@ -4,6 +4,7 @@
#nullable disable
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
@ -828,9 +829,17 @@ namespace osu.Game.Screens.Play
private bool onFail()
{
// Failing after the quit sequence has started may cause weird side effects with the fail animation / effects.
if (GameplayState.HasQuit)
return false;
if (!CheckModsAllowFailure())
return false;
Debug.Assert(!GameplayState.HasFailed);
Debug.Assert(!GameplayState.HasPassed);
Debug.Assert(!GameplayState.HasQuit);
GameplayState.HasFailed = true;
updateGameplayState();