From 38431f8555d37a54c8963f2a48f734f30f1c947a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 19 Jul 2017 19:10:04 +0900 Subject: [PATCH] Fix remaining test case issues --- osu.Game/Screens/Play/Player.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 82ef85d463..7bd310e168 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -69,6 +69,8 @@ namespace osu.Game.Screens.Play private HUDOverlay hudOverlay; private FailOverlay failOverlay; + private bool loadedSuccessfully => HitRenderer?.Objects.Any() == true; + [BackgroundDependencyLoader(permitNulls: true)] private void load(AudioManager audio, BeatmapDatabase beatmaps, OsuConfigManager config, OsuGame osu) { @@ -266,6 +268,9 @@ namespace osu.Game.Screens.Play { base.OnEntering(last); + if (!loadedSuccessfully) + return; + (Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, EasingTypes.OutQuint); Background?.FadeTo(1 - (float)dimLevel, 1500, EasingTypes.OutQuint); @@ -305,7 +310,11 @@ namespace osu.Game.Screens.Play return base.OnExiting(next); } - pauseContainer.Pause(); + if (loadedSuccessfully) + { + pauseContainer.Pause(); + } + return true; }