mirror of
https://github.com/osukey/osukey.git
synced 2025-05-09 23:57:18 +09:00
Remove unnecessary Ruleset
null check in BeatmapDifficultyCache
This commit is contained in:
parent
7baff18764
commit
86b2ac3217
@ -136,7 +136,7 @@ namespace osu.Game.Beatmaps
|
|||||||
var localRulesetInfo = rulesetInfo as RulesetInfo;
|
var localRulesetInfo = rulesetInfo as RulesetInfo;
|
||||||
|
|
||||||
// Difficulty can only be computed if the beatmap and ruleset are locally available.
|
// Difficulty can only be computed if the beatmap and ruleset are locally available.
|
||||||
if (localBeatmapInfo?.Ruleset == null || localRulesetInfo == null)
|
if (localBeatmapInfo == null || localRulesetInfo == null)
|
||||||
{
|
{
|
||||||
// If not, fall back to the existing star difficulty (e.g. from an online source).
|
// 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));
|
return Task.FromResult<StarDifficulty?>(new StarDifficulty(beatmapInfo.StarRating, (beatmapInfo as IBeatmapOnlineInfo)?.MaxCombo ?? 0));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user