Skip to content

Commit

Permalink
Merge pull request ppy#30862 from frenzibyte/dont-scare-the-player
Browse files Browse the repository at this point in the history
Don't play fail animation if restarting on fail
  • Loading branch information
peppy authored Nov 24, 2024
2 parents 888f02e + 6d0d7f3 commit c34827a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions osu.Game/Screens/Play/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,9 @@ private bool onFail()
if (PauseOverlay.State.Value == Visibility.Visible)
PauseOverlay.Hide();

failAnimationContainer.Start();
bool restartOnFail = GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail);
if (!restartOnFail)
failAnimationContainer.Start();

// Failures can be triggered either by a judgement, or by a mod.
//
Expand All @@ -990,7 +992,7 @@ private bool onFail()
ScoreProcessor.FailScore(Score.ScoreInfo);
OnFail();
if (GameplayState.Mods.OfType<IApplicableFailOverride>().Any(m => m.RestartOnFail))
if (restartOnFail)
Restart(true);
});
}
Expand Down

0 comments on commit c34827a

Please sign in to comment.