From 3f5c4633bc235a6ed0add44b72295be71833c7a9 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 27 Feb 2020 16:40:56 +0900 Subject: [PATCH] Remove workarounds for CreateRoomRequest shortcomings --- osu.Game/Online/Multiplayer/PlaylistItem.cs | 4 +--- osu.Game/Online/Multiplayer/Room.cs | 9 --------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/osu.Game/Online/Multiplayer/PlaylistItem.cs b/osu.Game/Online/Multiplayer/PlaylistItem.cs index 11e4854174..9d6e8eb8e3 100644 --- a/osu.Game/Online/Multiplayer/PlaylistItem.cs +++ b/osu.Game/Online/Multiplayer/PlaylistItem.cs @@ -65,9 +65,7 @@ public PlaylistItem() public void MapObjects(BeatmapManager beatmaps, RulesetStore rulesets) { - // If we don't have an api beatmap, the request occurred as a result of room creation, so we can query the local beatmap instead - // Todo: Is this a bug? Room creation only returns the beatmap ID - Beatmap.Value = apiBeatmap == null ? beatmaps.QueryBeatmap(b => b.OnlineBeatmapID == BeatmapID) : apiBeatmap.ToBeatmap(rulesets); + Beatmap.Value = apiBeatmap.ToBeatmap(rulesets); Ruleset.Value = rulesets.GetRuleset(RulesetID); Ruleset rulesetInstance = Ruleset.Value.CreateInstance(); diff --git a/osu.Game/Online/Multiplayer/Room.cs b/osu.Game/Online/Multiplayer/Room.cs index 2bfcc019fa..c55822c407 100644 --- a/osu.Game/Online/Multiplayer/Room.cs +++ b/osu.Game/Online/Multiplayer/Room.cs @@ -118,15 +118,6 @@ public void CopyFrom(Room other) if (DateTimeOffset.Now >= EndDate.Value) Status.Value = new RoomStatusEnded(); - // transfer local beatmaps across to ensure we have Metadata available (CreateRoomRequest does not give us metadata as expected) - foreach (var item in other.Playlist) - { - var localItem = Playlist.FirstOrDefault(i => i.BeatmapID == item.BeatmapID); - - if (localItem != null) - item.Beatmap.Value.Metadata = localItem.Beatmap.Value.Metadata; - } - if (!Playlist.SequenceEqual(other.Playlist)) { Playlist.Clear();