mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Remove unnecessary null check
This commit is contained in:
parent
4203e2183d
commit
67650831bd
@ -199,15 +199,13 @@ namespace osu.Game.Database
|
|||||||
if (!score.IsLegacyScore)
|
if (!score.IsLegacyScore)
|
||||||
return score.TotalScore;
|
return score.TotalScore;
|
||||||
|
|
||||||
var beatmap = beatmaps.GetWorkingBeatmap(score.BeatmapInfo);
|
WorkingBeatmap beatmap = beatmaps.GetWorkingBeatmap(score.BeatmapInfo);
|
||||||
var ruleset = score.Ruleset.CreateInstance();
|
Ruleset ruleset = score.Ruleset.CreateInstance();
|
||||||
|
|
||||||
if (ruleset is not ILegacyRuleset legacyRuleset)
|
if (ruleset is not ILegacyRuleset legacyRuleset)
|
||||||
return score.TotalScore;
|
return score.TotalScore;
|
||||||
|
|
||||||
var sv1Processor = legacyRuleset.CreateLegacyScoreProcessor();
|
ILegacyScoreProcessor sv1Processor = legacyRuleset.CreateLegacyScoreProcessor();
|
||||||
if (sv1Processor == null)
|
|
||||||
return score.TotalScore;
|
|
||||||
|
|
||||||
sv1Processor.Simulate(beatmap, beatmap.GetPlayableBeatmap(ruleset.RulesetInfo, score.Mods), score.Mods);
|
sv1Processor.Simulate(beatmap, beatmap.GetPlayableBeatmap(ruleset.RulesetInfo, score.Mods), score.Mods);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user