mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +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)
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user