From 794ae5380a341b83feb61377f9710369211bfe0d Mon Sep 17 00:00:00 2001 From: Michael Manis Date: Mon, 22 Jan 2018 01:06:27 -0500 Subject: [PATCH] Intverted conditionals. --- osu-framework | 2 +- osu.Game/Screens/Play/Player.cs | 31 +++++++++++++++---------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/osu-framework b/osu-framework index 26c01ca606..8f36ddab94 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 26c01ca6069296621f76d8ffbfe31ecf8074c687 +Subproject commit 8f36ddab946ff538620081ede7719461d4732b79 diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index e29ff8edd3..a53d598730 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -208,12 +208,12 @@ namespace osu.Game.Screens.Play new HotkeyRetryOverlay { Action = () => { - if (IsCurrentScreen) { - //we want to hide the hitrenderer immediately (looks better). - //we may be able to remove this once the mouse cursor trail is improved. - RulesetContainer?.Hide(); - Restart(); - } + if (!IsCurrentScreen) return; + + //we want to hide the hitrenderer immediately (looks better). + //we may be able to remove this once the mouse cursor trail is improved. + RulesetContainer?.Hide(); + Restart(); }, } }; @@ -290,17 +290,16 @@ namespace osu.Game.Screens.Play { onCompletionEvent = Schedule(delegate { - if (IsCurrentScreen) + if (!IsCurrentScreen) return; + + var score = new Score { - var score = new Score - { - Beatmap = Beatmap.Value.BeatmapInfo, - Ruleset = ruleset - }; - scoreProcessor.PopulateScore(score); - score.User = RulesetContainer.Replay?.User ?? api.LocalUser.Value; - Push(new Results(score)); - } + Beatmap = Beatmap.Value.BeatmapInfo, + Ruleset = ruleset + }; + scoreProcessor.PopulateScore(score); + score.User = RulesetContainer.Replay?.User ?? api.LocalUser.Value; + Push(new Results(score)); }); } }