diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerScoreSubmission.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerScoreSubmission.cs index 1a7ea20cc0..f75a2656ef 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerScoreSubmission.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerScoreSubmission.cs @@ -179,7 +179,6 @@ public void TestSubmissionOnFail() addFakeHit(); AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed); - AddStep("exit", () => Player.Exit()); AddUntilStep("wait for submission", () => Player.SubmittedScore != null); AddAssert("ensure failing submission", () => Player.SubmittedScore.ScoreInfo.Passed == false); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index ad725e1a90..b469ab443c 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -933,6 +933,7 @@ private bool onFail() if (GameplayState.Mods.OfType().Any(m => m.RestartOnFail)) Restart(true); + OnFail(); return true; } diff --git a/osu.Game/Screens/Play/SubmittingPlayer.cs b/osu.Game/Screens/Play/SubmittingPlayer.cs index 14aaa8f638..785164178a 100644 --- a/osu.Game/Screens/Play/SubmittingPlayer.cs +++ b/osu.Game/Screens/Play/SubmittingPlayer.cs @@ -54,8 +54,6 @@ private void load() } AddInternal(new PlayerTouchInputDetector()); - - HealthProcessor.Failed += onFail; } protected override void LoadAsyncComplete() @@ -167,10 +165,11 @@ protected override void StartGameplay() spectatorClient.BeginPlaying(token, GameplayState, Score); } - private bool onFail() + protected override void OnFail() { + base.OnFail(); + submitFromFailOrQuit(); - return true; } public override bool OnExiting(ScreenExitEvent e)