diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs index 30fecbe149..14aaa8f638 100644 --- a/osu.Game/Screens/Play/SubmittingPlayer.cs +++ b/osu.Game/Screens/Play/SubmittingPlayer.cs @@ -54,6 +54,8 @@ private void load() } AddInternal(new PlayerTouchInputDetector()); + + HealthProcessor.Failed += onFail; } protected override void LoadAsyncComplete() @@ -165,10 +167,21 @@ protected override void StartGameplay() spectatorClient.BeginPlaying(token, GameplayState, Score); } + private bool onFail() + { + submitFromFailOrQuit(); + return true; + } + public override bool OnExiting(ScreenExitEvent e) { bool exiting = base.OnExiting(e); + submitFromFailOrQuit(); + return exiting; + } + private void submitFromFailOrQuit() + { if (LoadedBeatmapSuccessfully) { Task.Run(async () => @@ -177,8 +190,6 @@ public override bool OnExiting(ScreenExitEvent e) spectatorClient.EndPlaying(GameplayState); }).FireAndForget(); } - - return exiting; } ///