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:
parent
4c45f7d938
commit
8f4a953d11
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user