diff --git a/osu.Game.Rulesets.Osu/Judgements/OsuJudgement.cs b/osu.Game.Rulesets.Osu/Judgements/OsuJudgement.cs index 3ccf1cd60c..28b6a04376 100644 --- a/osu.Game.Rulesets.Osu/Judgements/OsuJudgement.cs +++ b/osu.Game.Rulesets.Osu/Judgements/OsuJudgement.cs @@ -10,6 +10,8 @@ namespace osu.Game.Rulesets.Osu.Judgements { public class OsuJudgement : Judgement { + public override HitResult MaxResult => HitResult.Great; + /// /// The positional hit offset. /// diff --git a/osu.Game.Rulesets.Taiko/Judgements/TaikoJudgement.cs b/osu.Game.Rulesets.Taiko/Judgements/TaikoJudgement.cs index a3cc228c20..3cd134f3f7 100644 --- a/osu.Game.Rulesets.Taiko/Judgements/TaikoJudgement.cs +++ b/osu.Game.Rulesets.Taiko/Judgements/TaikoJudgement.cs @@ -8,6 +8,8 @@ namespace osu.Game.Rulesets.Taiko.Judgements { public class TaikoJudgement : Judgement { + public override HitResult MaxResult => HitResult.Great; + /// /// Computes the numeric result value for the combo portion of the score. /// diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index 2f8459b527..5d31ee9729 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -162,11 +162,9 @@ public abstract class ScoreProcessor : ScoreProcessor protected int MaxHits { get; private set; } protected int Hits { get; private set; } - private int maxAccurateHits; - private int accurateHits; - private double maxHighestCombo; private double maxComboScore; + private double rollingMaxComboScore; private double comboScore; protected ScoreProcessor() @@ -219,16 +217,15 @@ protected virtual void OnNewJudgement(Judgement judgement) } comboScore += judgement.NumericResult; + rollingMaxComboScore += judgement.MaxNumericResult; } else if (judgement.IsHit) bonusScore += judgement.NumericResult; if (judgement.AffectsAccuracy) - { Hits++; - if (judgement.IsHit) - accurateHits++; - } + + Accuracy.Value = comboScore / rollingMaxComboScore; switch (Mode.Value) { @@ -236,15 +233,13 @@ protected virtual void OnNewJudgement(Judgement judgement) TotalScore.Value = max_score * (ComboPortion * (comboScore * Math.Log(HighestCombo + 1, 2)) / (maxComboScore * Math.Log(maxHighestCombo + 1, 2)) - + AccuracyPortion * accurateHits / maxAccurateHits) + + AccuracyPortion * Accuracy) + bonusScore; break; case ScoringMode.Exponential: TotalScore.Value = (comboScore + bonusScore) * Math.Log(HighestCombo + 1, 2); break; } - - Accuracy.Value = (double)accurateHits / Hits; } protected override void Reset(bool storeResults) @@ -252,7 +247,6 @@ protected override void Reset(bool storeResults) if (storeResults) { MaxHits = Hits; - maxAccurateHits = accurateHits; maxHighestCombo = HighestCombo; maxComboScore = comboScore; } @@ -260,8 +254,8 @@ protected override void Reset(bool storeResults) base.Reset(storeResults); Hits = 0; - accurateHits = 0; comboScore = 0; + rollingMaxComboScore = 0; } }