diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
index 853f43ddb6..dd977a5c50 100644
--- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
+++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs
@@ -93,7 +93,18 @@ namespace osu.Game.Rulesets.Scoring
///
/// Scoring values for a perfect play.
///
- public ScoringValues MaximumScoringValues { get; private set; }
+ public ScoringValues MaximumScoringValues
+ {
+ get
+ {
+ if (!beatmapApplied)
+ throw new InvalidOperationException($"Cannot access maximum scoring values before calling {nameof(ApplyBeatmap)}.");
+
+ return maximumScoringValues;
+ }
+ }
+
+ private ScoringValues maximumScoringValues;
///
/// Scoring values for the current play assuming all perfect hits.
@@ -255,7 +266,7 @@ namespace osu.Game.Rulesets.Scoring
private void updateScore()
{
Accuracy.Value = currentMaximumScoringValues.BaseScore > 0 ? currentScoringValues.BaseScore / currentMaximumScoringValues.BaseScore : 1;
- TotalScore.Value = ComputeScore(Mode.Value, currentScoringValues, MaximumScoringValues);
+ TotalScore.Value = ComputeScore(Mode.Value, currentScoringValues, maximumScoringValues);
}
///
@@ -406,7 +417,7 @@ namespace osu.Game.Rulesets.Scoring
lastHitObject = null;
if (storeResults)
- MaximumScoringValues = currentScoringValues;
+ maximumScoringValues = currentScoringValues;
currentScoringValues = default;
currentMaximumScoringValues = default;