From fc0b297232b46885454e65af4c42c518bb428b08 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 5 Mar 2019 18:06:24 +0900 Subject: [PATCH 01/10] Fix menu cursor not displaying outside of gameplay scaling area --- osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs | 6 +++--- .../{GameplayCursor.cs => GameplayCursorContainer.cs} | 4 ++-- osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs | 2 +- osu.Game/Rulesets/UI/RulesetContainer.cs | 10 ++++++++-- osu.Game/Screens/Play/Player.cs | 7 +------ 5 files changed, 15 insertions(+), 14 deletions(-) rename osu.Game.Rulesets.Osu/UI/Cursor/{GameplayCursor.cs => GameplayCursorContainer.cs} (98%) diff --git a/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs b/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs index 3d553c334f..5c1e775c01 100644 --- a/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs +++ b/osu.Game.Rulesets.Osu.Tests/TestCaseGameplayCursor.cs @@ -16,18 +16,18 @@ namespace osu.Game.Rulesets.Osu.Tests [TestFixture] public class TestCaseGameplayCursor : OsuTestCase, IProvideCursor { - private GameplayCursor cursor; + private GameplayCursorContainer cursorContainer; public override IReadOnlyList RequiredTypes => new[] { typeof(CursorTrail) }; - public CursorContainer Cursor => cursor; + public CursorContainer Cursor => cursorContainer; public bool ProvidingUserCursor => true; [BackgroundDependencyLoader] private void load() { - Add(cursor = new GameplayCursor { RelativeSizeAxes = Axes.Both }); + Add(cursorContainer = new GameplayCursorContainer { RelativeSizeAxes = Axes.Both }); } } } diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs b/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursorContainer.cs similarity index 98% rename from osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs rename to osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursorContainer.cs index ef126cdf7d..ca8368155f 100644 --- a/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursor.cs +++ b/osu.Game.Rulesets.Osu/UI/Cursor/GameplayCursorContainer.cs @@ -17,7 +17,7 @@ using osuTK.Graphics; namespace osu.Game.Rulesets.Osu.UI.Cursor { - public class GameplayCursor : CursorContainer, IKeyBindingHandler + public class GameplayCursorContainer : CursorContainer, IKeyBindingHandler { protected override Drawable CreateCursor() => new OsuCursor(); @@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor private readonly Container fadeContainer; - public GameplayCursor() + public GameplayCursorContainer() { InternalChild = fadeContainer = new Container { diff --git a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs index 85b72cbb5b..805bbfb4d4 100644 --- a/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs +++ b/osu.Game.Rulesets.Osu/UI/OsuRulesetContainer.cs @@ -60,6 +60,6 @@ namespace osu.Game.Rulesets.Osu.UI } } - protected override CursorContainer CreateCursor() => new GameplayCursor(); + protected override CursorContainer CreateCursor() => new GameplayCursorContainer(); } } diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 1c29cf4e2b..c9ad7bb5ec 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -16,7 +16,9 @@ using System.Linq; using osu.Framework.Bindables; using osu.Framework.Graphics.Cursor; using osu.Framework.Input; +using osu.Framework.Input.Events; using osu.Game.Configuration; +using osu.Game.Graphics.Cursor; using osu.Game.Input.Handlers; using osu.Game.Overlays; using osu.Game.Replays; @@ -32,7 +34,7 @@ namespace osu.Game.Rulesets.UI /// Should not be derived - derive instead. /// /// - public abstract class RulesetContainer : Container + public abstract class RulesetContainer : Container, IProvideCursor { /// /// The selected variant. @@ -77,7 +79,11 @@ namespace osu.Game.Rulesets.UI /// /// The cursor provided by this . May be null if no cursor is provided. /// - public readonly CursorContainer Cursor; + public CursorContainer Cursor { get; } + + public bool ProvidingUserCursor => Cursor != null && !HasReplayLoaded.Value; + + protected override bool OnHover(HoverEvent e) => true; // required for IProvideCursor public readonly Ruleset Ruleset; diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index ee59df0e98..1518ee2f32 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -11,7 +11,6 @@ using osu.Framework.Audio.Sample; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Cursor; using osu.Framework.Input.Events; using osu.Framework.Logging; using osu.Framework.Screens; @@ -20,7 +19,6 @@ using osu.Framework.Timing; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Graphics.Containers; -using osu.Game.Graphics.Cursor; using osu.Game.Online.API; using osu.Game.Overlays; using osu.Game.Rulesets; @@ -34,7 +32,7 @@ using osu.Game.Storyboards.Drawables; namespace osu.Game.Screens.Play { - public class Player : ScreenWithBeatmapBackground, IProvideCursor + public class Player : ScreenWithBeatmapBackground { protected override bool AllowBackButton => false; // handled by HoldForMenuButton @@ -59,9 +57,6 @@ namespace osu.Game.Screens.Play public int RestartCount; - public CursorContainer Cursor => RulesetContainer.Cursor; - public bool ProvidingUserCursor => RulesetContainer?.Cursor != null && !RulesetContainer.HasReplayLoaded.Value; - private IAdjustableClock sourceClock; /// From eb80549782d5fc0a8c49e6c0eab7f34d3e3451b9 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 18:18:47 +0900 Subject: [PATCH 02/10] Fix UpdateableBeatmapBackgroundSprite not disposing of previously loaded sprites --- .../UpdateableBeatmapBackgroundSprite.cs | 66 +++++++++++-------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs index 012926fb0e..773730c2fe 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs @@ -9,7 +9,7 @@ using osu.Framework.Graphics.Containers; namespace osu.Game.Beatmaps.Drawables { /// - /// Display a baetmap background from a local source, but fallback to online source if not available. + /// Display a beatmap background from a local source, but fallback to online source if not available. /// public class UpdateableBeatmapBackgroundSprite : ModelBackedDrawable { @@ -26,37 +26,51 @@ namespace osu.Game.Beatmaps.Drawables this.beatmapSetCoverType = beatmapSetCoverType; } - protected override Drawable CreateDrawable(BeatmapInfo model) + private BeatmapInfo lastModel; + + protected override DelayedLoadWrapper CreateDelayedLoadWrapper(Drawable content, double timeBeforeLoad) { return new DelayedLoadUnloadWrapper(() => { - Drawable drawable; + // If DelayedLoadUnloadWrapper is attempting to RELOAD the same content (Beatmap), that means that it was + // previously UNLOADED and thus its children have been disposed of, so we need to recreate them here. + if (lastModel == Beatmap.Value) + return CreateDrawable(Beatmap.Value); - var localBeatmap = beatmaps.GetWorkingBeatmap(model); - - if (model?.BeatmapSet?.OnlineInfo != null) - drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); - else if (localBeatmap.BeatmapInfo.ID != 0) - { - // Fall back to local background if one exists - drawable = new BeatmapBackgroundSprite(localBeatmap); - } - else - { - // Use the default background if somehow an online set does not exist and we don't have a local copy. - drawable = new BeatmapBackgroundSprite(beatmaps.DefaultBeatmap); - } - - drawable.RelativeSizeAxes = Axes.Both; - drawable.Anchor = Anchor.Centre; - drawable.Origin = Anchor.Centre; - drawable.FillMode = FillMode.Fill; - drawable.OnLoadComplete = d => d.FadeInFromZero(400); - - return drawable; + // If the model has changed since the previous unload (or if there was no load), then we can safely use the given content + lastModel = Beatmap.Value; + return content; }, 500, 10000); } - protected override double FadeDuration => 0; + protected override Drawable CreateDrawable(BeatmapInfo model) + { + Drawable drawable; + + var localBeatmap = beatmaps.GetWorkingBeatmap(model); + + if (model?.BeatmapSet?.OnlineInfo != null) + { + drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType); + } + else if (localBeatmap.BeatmapInfo.ID != 0) + { + // Fall back to local background if one exists + drawable = new BeatmapBackgroundSprite(localBeatmap); + } + else + { + // Use the default background if somehow an online set does not exist and we don't have a local copy. + drawable = new BeatmapBackgroundSprite(beatmaps.DefaultBeatmap); + } + + drawable.RelativeSizeAxes = Axes.Both; + drawable.Anchor = Anchor.Centre; + drawable.Origin = Anchor.Centre; + drawable.FillMode = FillMode.Fill; + drawable.OnLoadComplete = d => d.FadeInFromZero(400); + + return drawable; + } } } From 06b65e00c423adbe18d43fe3de050f6fde36067e Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 18:53:53 +0900 Subject: [PATCH 03/10] Prevent null beatmap from creating an extra drawable --- .../Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs index 773730c2fe..4740b25ba9 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs @@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps.Drawables { // If DelayedLoadUnloadWrapper is attempting to RELOAD the same content (Beatmap), that means that it was // previously UNLOADED and thus its children have been disposed of, so we need to recreate them here. - if (lastModel == Beatmap.Value) + if (lastModel == Beatmap.Value && Beatmap.Value != null) return CreateDrawable(Beatmap.Value); // If the model has changed since the previous unload (or if there was no load), then we can safely use the given content From ab0ac7a82a541ba790468b5852f9713edeca7e89 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 18:56:40 +0900 Subject: [PATCH 04/10] Pass through timeBeforeLoad instead of hardcoding --- .../Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs index 4740b25ba9..f0af09459f 100644 --- a/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs @@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps.Drawables // If the model has changed since the previous unload (or if there was no load), then we can safely use the given content lastModel = Beatmap.Value; return content; - }, 500, 10000); + }, timeBeforeLoad, 10000); } protected override Drawable CreateDrawable(BeatmapInfo model) From b5e89e2f3b05418ec84197ce59ae5c2934675cef Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 18:55:01 +0900 Subject: [PATCH 05/10] Add additional testing to check for extra children in the future --- ...stCaseUpdateableBeatmapBackgroundSprite.cs | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs index 3ee617e092..9a2124450c 100644 --- a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs @@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual { public class TestCaseUpdateableBeatmapBackgroundSprite : OsuTestCase { - private UpdateableBeatmapBackgroundSprite backgroundSprite; + private TestUpdateableBeatmapBackgroundSprite backgroundSprite; [Resolved] private BeatmapManager beatmaps { get; set; } @@ -28,30 +28,39 @@ namespace osu.Game.Tests.Visual var imported = ImportBeatmapTest.LoadOszIntoOsu(osu); - Child = backgroundSprite = new UpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both }; + Child = backgroundSprite = new TestUpdateableBeatmapBackgroundSprite { RelativeSizeAxes = Axes.Both }; backgroundSprite.Beatmap.BindTo(beatmapBindable); var req = new GetBeatmapSetRequest(1); api.Queue(req); - AddStep("null", () => beatmapBindable.Value = null); - - AddStep("imported", () => beatmapBindable.Value = imported.Beatmaps.First()); + AddStep("load null beatmap", () => beatmapBindable.Value = null); + AddWaitStep(20, "wait for transition..."); + AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); + AddStep("load imported beatmap", () => beatmapBindable.Value = imported.Beatmaps.First()); + AddWaitStep(20, "wait for transition..."); + AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); if (api.IsLoggedIn) { AddUntilStep(() => req.Result != null, "wait for api response"); - - AddStep("online", () => beatmapBindable.Value = new BeatmapInfo + AddStep("load online beatmap", () => beatmapBindable.Value = new BeatmapInfo { BeatmapSet = req.Result?.ToBeatmapSet(rulesets) }); + AddWaitStep(20, "wait for transition..."); + AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); } else { AddStep("online (login first)", () => { }); } } + + private class TestUpdateableBeatmapBackgroundSprite : UpdateableBeatmapBackgroundSprite + { + public int ChildCount => InternalChildren.Count; + } } } From 8a69fc5534b7dbe07f93987251ceb1b8378a0b5b Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 19:57:09 +0900 Subject: [PATCH 06/10] Use AddUntilStep instead of AddWaitStep --- .../Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs index 9a2124450c..506121efd7 100644 --- a/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs +++ b/osu.Game.Tests/Visual/TestCaseUpdateableBeatmapBackgroundSprite.cs @@ -36,11 +36,9 @@ namespace osu.Game.Tests.Visual api.Queue(req); AddStep("load null beatmap", () => beatmapBindable.Value = null); - AddWaitStep(20, "wait for transition..."); - AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); + AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup..."); AddStep("load imported beatmap", () => beatmapBindable.Value = imported.Beatmaps.First()); - AddWaitStep(20, "wait for transition..."); - AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); + AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup..."); if (api.IsLoggedIn) { @@ -49,8 +47,7 @@ namespace osu.Game.Tests.Visual { BeatmapSet = req.Result?.ToBeatmapSet(rulesets) }); - AddWaitStep(20, "wait for transition..."); - AddAssert("ensure only 1 child is present", () => backgroundSprite.ChildCount == 1); + AddUntilStep(() => backgroundSprite.ChildCount == 1, "wait for cleanup..."); } else { From 5de6e29294d07dac6823673d6e9c6d3146f913c4 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 17:13:41 +0900 Subject: [PATCH 07/10] Reset currentRoom state when cancelling room creation --- osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index a71106872e..902a8c1c57 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -53,6 +53,9 @@ namespace osu.Game.Screens.Multi.Match private MatchLeaderboard leaderboard; + [Resolved] + private Bindable currentRoom { get; set; } + public MatchSubScreen(Room room) { Title = room.RoomID.Value == null ? "New room" : room.Name.Value; @@ -182,6 +185,10 @@ namespace osu.Game.Screens.Multi.Match public override bool OnExiting(IScreen next) { RoomManager?.PartRoom(); + + if (roomId.Value == null) + currentRoom.Value = new Room(); + return base.OnExiting(next); } From 6e5ea78ca258e4a22e4ed36041959cc615126d5e Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Wed, 6 Mar 2019 17:13:28 +0900 Subject: [PATCH 08/10] Fix some nullref crashes when escaping out of new room creation --- osu.Game/Screens/Multi/Match/Components/Header.cs | 4 +++- osu.Game/Screens/Select/MatchSongSelect.cs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Multi/Match/Components/Header.cs b/osu.Game/Screens/Multi/Match/Components/Header.cs index 6a6a1f274c..e1592532a3 100644 --- a/osu.Game/Screens/Multi/Match/Components/Header.cs +++ b/osu.Game/Screens/Multi/Match/Components/Header.cs @@ -2,6 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; @@ -13,6 +14,7 @@ using osu.Game.Beatmaps.Drawables; using osu.Game.Graphics; using osu.Game.Online.Multiplayer; using osu.Game.Overlays.SearchableList; +using osu.Game.Rulesets.Mods; using osu.Game.Screens.Multi.Components; using osu.Game.Screens.Play.HUD; using osuTK; @@ -108,7 +110,7 @@ namespace osu.Game.Screens.Multi.Match.Components }, }; - CurrentItem.BindValueChanged(item => modDisplay.Current.Value = item.NewValue?.RequiredMods, true); + CurrentItem.BindValueChanged(item => modDisplay.Current.Value = item.NewValue?.RequiredMods ?? Enumerable.Empty(), true); beatmapButton.Action = () => RequestBeatmapSelection?.Invoke(); } diff --git a/osu.Game/Screens/Select/MatchSongSelect.cs b/osu.Game/Screens/Select/MatchSongSelect.cs index f6d758df29..fcd07384e4 100644 --- a/osu.Game/Screens/Select/MatchSongSelect.cs +++ b/osu.Game/Screens/Select/MatchSongSelect.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Humanizer; using osu.Framework.Allocation; using osu.Framework.Bindables; @@ -61,7 +62,7 @@ namespace osu.Game.Screens.Select return true; Beatmap.Value = beatmaps.GetWorkingBeatmap(CurrentItem.Value?.Beatmap); - Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods; + Beatmap.Value.Mods.Value = selectedMods.Value = CurrentItem.Value?.RequiredMods ?? Enumerable.Empty(); Ruleset.Value = CurrentItem.Value?.Ruleset; Beatmap.Disabled = true; From 50c1b3a576c0e1a86edd4b86cd1d6b6c47b561a5 Mon Sep 17 00:00:00 2001 From: Jamie Taylor Date: Thu, 7 Mar 2019 16:49:48 +0900 Subject: [PATCH 09/10] Move room resetting logic from MatchSubScreen to LoungeSubScreen --- osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs | 8 ++++++++ osu.Game/Screens/Multi/Match/MatchSubScreen.cs | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs index dd1e060125..7cbae611ea 100644 --- a/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs +++ b/osu.Game/Screens/Multi/Lounge/LoungeSubScreen.cs @@ -107,6 +107,14 @@ namespace osu.Game.Screens.Multi.Lounge Filter.Search.HoldFocus = false; } + public override void OnResuming(IScreen last) + { + base.OnResuming(last); + + if (currentRoom.Value?.RoomID.Value == null) + currentRoom.Value = new Room(); + } + private void joinRequested(Room room) { processingOverlay.Show(); diff --git a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs index 902a8c1c57..a71106872e 100644 --- a/osu.Game/Screens/Multi/Match/MatchSubScreen.cs +++ b/osu.Game/Screens/Multi/Match/MatchSubScreen.cs @@ -53,9 +53,6 @@ namespace osu.Game.Screens.Multi.Match private MatchLeaderboard leaderboard; - [Resolved] - private Bindable currentRoom { get; set; } - public MatchSubScreen(Room room) { Title = room.RoomID.Value == null ? "New room" : room.Name.Value; @@ -185,10 +182,6 @@ namespace osu.Game.Screens.Multi.Match public override bool OnExiting(IScreen next) { RoomManager?.PartRoom(); - - if (roomId.Value == null) - currentRoom.Value = new Room(); - return base.OnExiting(next); } From d01b026ebd3deb545130d60f05df1f7cc0f52048 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 8 Mar 2019 12:00:12 +0900 Subject: [PATCH 10/10] Fix stuck r# inspection --- osu.Game/Utils/RavenLogger.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Utils/RavenLogger.cs b/osu.Game/Utils/RavenLogger.cs index acc3ab28b5..7f4faa60ae 100644 --- a/osu.Game/Utils/RavenLogger.cs +++ b/osu.Game/Utils/RavenLogger.cs @@ -20,14 +20,14 @@ namespace osu.Game.Utils private readonly List tasks = new List(); - private Exception lastException; - public RavenLogger(OsuGame game) { raven.Release = game.Version; if (!game.IsDeployedBuild) return; + Exception lastException = null; + Logger.NewEntry += entry => { if (entry.Level < LogLevel.Verbose) return;