1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Fix BeatmapDifficultyCache not working with detached beatmaps

This commit is contained in:
Dean Herbert 2022-01-07 23:56:04 +09:00
parent 52ca649159
commit 76670a8faa

View File

@ -136,7 +136,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?.IsManaged != true || localRulesetInfo == null)
if (localBeatmapInfo?.Ruleset == null || localRulesetInfo == null)
{
// If not, fall back to the existing star difficulty (e.g. from an online source).
return Task.FromResult<StarDifficulty?>(new StarDifficulty(beatmapInfo.StarRating, (beatmapInfo as IBeatmapOnlineInfo)?.MaxCombo ?? 0));