Remove accurateHits, make Accuracy once again tied to comboScore

This commit is contained in:
smoogipooo 2017-09-13 00:33:01 +09:00
parent 2a45451308
commit 7b44ad300f
3 changed files with 10 additions and 12 deletions

View File

@ -10,6 +10,8 @@ namespace osu.Game.Rulesets.Osu.Judgements
{
public class OsuJudgement : Judgement
{
public override HitResult MaxResult => HitResult.Great;
/// <summary>
/// The positional hit offset.
/// </summary>

View File

@ -8,6 +8,8 @@ namespace osu.Game.Rulesets.Taiko.Judgements
{
public class TaikoJudgement : Judgement
{
public override HitResult MaxResult => HitResult.Great;
/// <summary>
/// Computes the numeric result value for the combo portion of the score.
/// </summary>

View File

@ -162,11 +162,9 @@ public abstract class ScoreProcessor<TObject> : 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;
}
}