From 59d3143645ce5af731bd52fc4a08fc12cc0268be Mon Sep 17 00:00:00 2001 From: Fabian van Oeffelt Date: Mon, 25 Sep 2023 16:53:40 +0200 Subject: [PATCH 1/5] Fix SR/BPM Display in Playlist rooms --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index 8d08de4168..cfae890323 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -32,6 +32,7 @@ using osu.Game.Rulesets.Mods; using osu.Game.Screens.Menu; using osu.Game.Screens.OnlinePlay.Match.Components; using osu.Game.Screens.OnlinePlay.Multiplayer; +using osuTK; namespace osu.Game.Screens.OnlinePlay.Match { @@ -437,6 +438,8 @@ namespace osu.Game.Screens.OnlinePlay.Match } else { + var localBeatmap = selected.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineID == selected.Beatmap.OnlineID); + UserModsSelectOverlay.Beatmap = beatmapManager.GetWorkingBeatmap(localBeatmap); UserModsSection?.Show(); UserModsSelectOverlay.IsValidMod = m => allowedMods.Any(a => a.GetType() == m.GetType()); } From 2a3391d83b0e1832a8127d2b8a9b7b6f3e940efb Mon Sep 17 00:00:00 2001 From: Fabian van Oeffelt Date: Mon, 25 Sep 2023 16:56:34 +0200 Subject: [PATCH 2/5] Remove unused namepace --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index cfae890323..f9482b810a 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -32,7 +32,6 @@ using osu.Game.Rulesets.Mods; using osu.Game.Screens.Menu; using osu.Game.Screens.OnlinePlay.Match.Components; using osu.Game.Screens.OnlinePlay.Multiplayer; -using osuTK; namespace osu.Game.Screens.OnlinePlay.Match { From 2040dcabe067a9daa54f6d6cab490d3c97f4ef45 Mon Sep 17 00:00:00 2001 From: Fabian van Oeffelt Date: Mon, 25 Sep 2023 17:51:39 +0200 Subject: [PATCH 3/5] Improve Code Quality --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index f9482b810a..ab29ac6d06 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -437,7 +437,7 @@ namespace osu.Game.Screens.OnlinePlay.Match } else { - var localBeatmap = selected.Beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineID == selected.Beatmap.OnlineID); + var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineID == selected.Beatmap.OnlineID); UserModsSelectOverlay.Beatmap = beatmapManager.GetWorkingBeatmap(localBeatmap); UserModsSection?.Show(); UserModsSelectOverlay.IsValidMod = m => allowedMods.Any(a => a.GetType() == m.GetType()); From 175cf68bd6003e61210929642ebf501725ad4b4c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 27 Sep 2023 18:13:07 +0900 Subject: [PATCH 4/5] Avoid re-fetching `WorkingBeatmap` --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index ab29ac6d06..2974035127 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -437,8 +437,7 @@ namespace osu.Game.Screens.OnlinePlay.Match } else { - var localBeatmap = beatmapManager.QueryBeatmap(b => b.OnlineID == selected.Beatmap.OnlineID); - UserModsSelectOverlay.Beatmap = beatmapManager.GetWorkingBeatmap(localBeatmap); + UserModsSelectOverlay.Beatmap = Beatmap.Value; UserModsSection?.Show(); UserModsSelectOverlay.IsValidMod = m => allowedMods.Any(a => a.GetType() == m.GetType()); } From a639e51ddb8c0de208ea5a6f7b54ffff5487370e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 27 Sep 2023 18:17:25 +0900 Subject: [PATCH 5/5] Fix value not updating after missing beatmap is imported --- osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs index 2974035127..b8887b3161 100644 --- a/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs +++ b/osu.Game/Screens/OnlinePlay/Match/RoomSubScreen.cs @@ -437,7 +437,6 @@ namespace osu.Game.Screens.OnlinePlay.Match } else { - UserModsSelectOverlay.Beatmap = Beatmap.Value; UserModsSection?.Show(); UserModsSelectOverlay.IsValidMod = m => allowedMods.Any(a => a.GetType() == m.GetType()); } @@ -453,7 +452,7 @@ namespace osu.Game.Screens.OnlinePlay.Match // Retrieve the corresponding local beatmap, since we can't directly use the playlist's beatmap info var localBeatmap = beatmap == null ? null : beatmapManager.QueryBeatmap(b => b.OnlineID == beatmap.OnlineID); - Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap); + UserModsSelectOverlay.Beatmap = Beatmap.Value = beatmapManager.GetWorkingBeatmap(localBeatmap); } protected virtual void UpdateMods()