From 25f511fd5b2b6b2bfbd9e1787182a8a87f086de0 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 18 Jan 2021 21:34:24 +0300 Subject: [PATCH] Remove unnecessary full querying --- osu.Game/Online/Rooms/MultiplayerBeatmapTracker.cs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/osu.Game/Online/Rooms/MultiplayerBeatmapTracker.cs b/osu.Game/Online/Rooms/MultiplayerBeatmapTracker.cs index 659f52f00f..c2c800badc 100644 --- a/osu.Game/Online/Rooms/MultiplayerBeatmapTracker.cs +++ b/osu.Game/Online/Rooms/MultiplayerBeatmapTracker.cs @@ -48,17 +48,7 @@ namespace osu.Game.Online.Rooms int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID; string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash; - BeatmapInfo matchingBeatmap; - - if (databasedSet.Beatmaps == null) - { - // The given databased beatmap set is not passed in a usable state to check with. - // Perform a full query instead, as per https://github.com/ppy/osu/pull/11415. - matchingBeatmap = Manager.QueryBeatmap(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum); - return matchingBeatmap != null; - } - - matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum); + var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum); return matchingBeatmap != null; }