1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Remove unnecessary null check

This commit is contained in:
Dean Herbert 2023-07-04 14:19:25 +09:00
parent 4203e2183d
commit 67650831bd

View File

@ -199,15 +199,13 @@ namespace osu.Game.Database
if (!score.IsLegacyScore)
return score.TotalScore;
var beatmap = beatmaps.GetWorkingBeatmap(score.BeatmapInfo);
var ruleset = score.Ruleset.CreateInstance();
WorkingBeatmap beatmap = beatmaps.GetWorkingBeatmap(score.BeatmapInfo);
Ruleset ruleset = score.Ruleset.CreateInstance();
if (ruleset is not ILegacyRuleset legacyRuleset)
return score.TotalScore;
var sv1Processor = legacyRuleset.CreateLegacyScoreProcessor();
if (sv1Processor == null)
return score.TotalScore;
ILegacyScoreProcessor sv1Processor = legacyRuleset.CreateLegacyScoreProcessor();
sv1Processor.Simulate(beatmap, beatmap.GetPlayableBeatmap(ruleset.RulesetInfo, score.Mods), score.Mods);