mirror of https://github.com/ppy/osu
Keep track of maximum hits + combo at base ScoreProcessor level
This commit is contained in:
parent
c7677d896a
commit
195c2d7a31
|
@ -143,6 +143,11 @@ public abstract class ScoreProcessor<TObject> : ScoreProcessor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly List<Judgement> Judgements = new List<Judgement>();
|
protected readonly List<Judgement> Judgements = new List<Judgement>();
|
||||||
|
|
||||||
|
private int maxHits;
|
||||||
|
private int maxCombo;
|
||||||
|
|
||||||
|
private int hits;
|
||||||
|
|
||||||
protected ScoreProcessor()
|
protected ScoreProcessor()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -154,6 +159,10 @@ protected ScoreProcessor(RulesetContainer<TObject> rulesetContainer)
|
||||||
rulesetContainer.OnJudgement += AddJudgement;
|
rulesetContainer.OnJudgement += AddJudgement;
|
||||||
|
|
||||||
ComputeTargets(rulesetContainer.Beatmap);
|
ComputeTargets(rulesetContainer.Beatmap);
|
||||||
|
|
||||||
|
maxCombo = HighestCombo;
|
||||||
|
maxHits = hits;
|
||||||
|
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,8 +182,6 @@ protected void AddJudgement(Judgement judgement)
|
||||||
{
|
{
|
||||||
switch (judgement.Result)
|
switch (judgement.Result)
|
||||||
{
|
{
|
||||||
case HitResult.None:
|
|
||||||
break;
|
|
||||||
case HitResult.Miss:
|
case HitResult.Miss:
|
||||||
Combo.Value = 0;
|
Combo.Value = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -184,6 +191,9 @@ protected void AddJudgement(Judgement judgement)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (judgement.AffectsCombo && judgement.IsHit)
|
||||||
|
hits++;
|
||||||
|
|
||||||
Judgements.Add(judgement);
|
Judgements.Add(judgement);
|
||||||
OnNewJudgement(judgement);
|
OnNewJudgement(judgement);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue