diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs
index 14023bb6ef..b647fb5d9e 100644
--- a/osu.Game/Screens/Play/Player.cs
+++ b/osu.Game/Screens/Play/Player.cs
@@ -83,6 +83,11 @@ namespace osu.Game.Screens.Play
///
protected virtual bool PauseOnFocusLost => true;
+ ///
+ /// Whether to show the fail overlay (with buttons to retry / exit) on failing.
+ ///
+ protected virtual bool ShowFailOverlay => true;
+
public Action RestartRequested;
private bool isRestarting;
@@ -1009,6 +1014,9 @@ namespace osu.Game.Screens.Play
///
private void onFailComplete()
{
+ if (!ShowFailOverlay)
+ return;
+
GameplayClockContainer.Stop();
FailOverlay.Retries = RestartCount;
diff --git a/osu.Game/Screens/Play/ReplayPlayer.cs b/osu.Game/Screens/Play/ReplayPlayer.cs
index 0c125264a1..5bd775749e 100644
--- a/osu.Game/Screens/Play/ReplayPlayer.cs
+++ b/osu.Game/Screens/Play/ReplayPlayer.cs
@@ -11,6 +11,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
+using osu.Framework.Screens;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Input.Bindings;
@@ -34,6 +35,8 @@ namespace osu.Game.Screens.Play
protected override UserActivity InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo);
+ protected override bool ShowFailOverlay => false;
+
// Disallow replays from failing. (see https://github.com/ppy/osu/issues/6108)
protected override bool CheckModsAllowFailure()
{
@@ -157,6 +160,20 @@ namespace osu.Game.Screens.Play
Seek(target);
}
+ protected override void OnFail()
+ {
+ // Replays will always show the results screen on failing.
+ Scheduler.AddDelayed(() =>
+ {
+ if (!this.IsCurrentScreen())
+ // This player instance may already be in the process of exiting.
+ return;
+
+ ValidForResume = false;
+ this.Push(CreateResults(Score.ScoreInfo));
+ }, RESULTS_DISPLAY_DELAY);
+ }
+
public void OnReleased(KeyBindingReleaseEvent e)
{
}