diff --git a/osu.Game/Scoring/ScorePerformanceManager.cs b/osu.Game/Scoring/ScorePerformanceManager.cs index 97b4be7edc..0189a86172 100644 --- a/osu.Game/Scoring/ScorePerformanceManager.cs +++ b/osu.Game/Scoring/ScorePerformanceManager.cs @@ -17,9 +17,6 @@ public class ScorePerformanceManager : Component { private readonly ConcurrentDictionary performanceCache = new ConcurrentDictionary(); - [Resolved] - private BeatmapManager beatmapManager { get; set; } - [Resolved] private BeatmapDifficultyManager difficultyManager { get; set; } @@ -45,14 +42,13 @@ private bool tryGetExisting(ScoreInfo score, out double performance, out Perform private async Task computePerformanceAsync(ScoreInfo score, PerformanceCacheLookup lookupKey, CancellationToken token = default) { - var beatmap = beatmapManager.GetWorkingBeatmap(score.Beatmap); var attributes = await difficultyManager.GetDifficultyAsync(score.Beatmap, score.Ruleset, score.Mods, token); if (token.IsCancellationRequested) return default; - var calculator = score.Ruleset.CreateInstance().CreatePerformanceCalculator(beatmap, score, attributes.Attributes); - var total = calculator.Calculate(); + var calculator = score.Ruleset.CreateInstance().CreatePerformanceCalculator(attributes.Attributes, score); + var total = calculator?.Calculate() ?? default; performanceCache[lookupKey] = total;