From 08b0ffad504c9836931626987a5adcbde04945cb Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 3 Nov 2021 03:12:13 +0900 Subject: [PATCH] Fix incorrect check for local beatmap in `BeatmapDifficultyCache` This was correct in the WIP branch I have, but pulled out alone (where usages of `ToBeatmapInfo` still exist) it was not enough. --- osu.Game/Beatmaps/BeatmapDifficultyCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Beatmaps/BeatmapDifficultyCache.cs b/osu.Game/Beatmaps/BeatmapDifficultyCache.cs index 9a0cdb387d..035f438b89 100644 --- a/osu.Game/Beatmaps/BeatmapDifficultyCache.cs +++ b/osu.Game/Beatmaps/BeatmapDifficultyCache.cs @@ -131,7 +131,7 @@ namespace osu.Game.Beatmaps var localRulesetInfo = rulesetInfo as RulesetInfo; // Difficulty can only be computed if the beatmap and ruleset are locally available. - if (localBeatmapInfo == null || localRulesetInfo == null) + if (localBeatmapInfo == null || localBeatmapInfo.ID == 0 || localRulesetInfo == null) { // If not, fall back to the existing star difficulty (e.g. from an online source). return Task.FromResult(new StarDifficulty(beatmapInfo.StarRating, (beatmapInfo as IBeatmapOnlineInfo)?.MaxCombo ?? 0));