From fa47309eeffbeba428af323b1ce317f4b761b63f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 12 Oct 2023 19:26:32 +0900 Subject: [PATCH] Fix exit key during storyboard outro not progressing to results --- .../Visual/Gameplay/TestSceneStoryboardWithOutro.cs | 4 ++-- osu.Game/Screens/Play/Player.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardWithOutro.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardWithOutro.cs index 09f729e468..98825b27d4 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardWithOutro.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardWithOutro.cs @@ -72,12 +72,12 @@ namespace osu.Game.Tests.Visual.Gameplay } [Test] - public void TestStoryboardExitDuringOutroStillExits() + public void TestStoryboardExitDuringOutroProgressesToResults() { CreateTest(); AddUntilStep("completion set by processor", () => Player.ScoreProcessor.HasCompleted.Value); AddStep("exit via pause", () => Player.ExitViaPause()); - AddAssert("player exited", () => !Player.IsCurrentScreen() && Player.GetChildScreen() == null); + AddUntilStep("reached results screen", () => Stack.CurrentScreen is ResultsScreen); } [TestCase(false)] diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 50ebe8cd86..97bfa35d49 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -596,7 +596,7 @@ namespace osu.Game.Screens.Play // Matching osu!stable behaviour, if the results screen is pending and the user requests an exit, // show the results instead. - if (resultsDisplayDelegate != null && !isRestarting) + if (GameplayState.HasPassed && !isRestarting) { progressToResults(false); return false;