diff --git a/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs b/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs index cba90b2ebe37..f4fb9f93ea89 100644 --- a/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs +++ b/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs @@ -259,6 +259,30 @@ public void TestLegacyComboIncrease() } #pragma warning restore CS0618 + [Test] + public void TestMaxAccuracyOnIgnoreMiss() + { + beatmap = new TestBeatmap(new RulesetInfo()) + { + HitObjects = new List + { + new TestHitObject(HitResult.Great), + new TestHitObject(HitResult.LargeTickHit, HitResult.IgnoreMiss), + } + }; + + scoreProcessor = new TestScoreProcessor(); + scoreProcessor.ApplyBeatmap(beatmap); + + scoreProcessor.ApplyResult(new JudgementResult(beatmap.HitObjects[0], beatmap.HitObjects[0].CreateJudgement()) { Type = HitResult.Miss }); + Assert.That(scoreProcessor.Combo.Value, Is.EqualTo(0)); + Assert.That(scoreProcessor.Accuracy.Value, Is.EqualTo(0)); + + scoreProcessor.ApplyResult(new JudgementResult(beatmap.HitObjects[1], beatmap.HitObjects[1].CreateJudgement()) { Type = HitResult.IgnoreMiss }); + Assert.That(scoreProcessor.Accuracy.Value, Is.EqualTo(0)); + Assert.That(scoreProcessor.MaximumAccuracy.Value, Is.EqualTo(0)); + } + [Test] public void TestComboBreak() { diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index 35a7dfe3699f..60f91fa499d4 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -202,6 +202,8 @@ public override void ApplyBeatmap(IBeatmap beatmap) protected sealed override void ApplyResultInternal(JudgementResult result) { + HitResult maxResult = result.Judgement.MaxResult; + result.ComboAtJudgement = Combo.Value; result.HighestComboAtJudgement = HighestCombo.Value; @@ -210,29 +212,29 @@ protected sealed override void ApplyResultInternal(JudgementResult result) scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) + 1; - if (!result.Type.IsScorable()) - return; - - if (result.Type.IncreasesCombo()) - Combo.Value++; - else if (result.Type.BreaksCombo()) - Combo.Value = 0; - - result.ComboAfterJudgement = Combo.Value; - - if (result.Type.AffectsAccuracy()) + if (maxResult.AffectsAccuracy()) { - currentMaximumBaseScore += Judgement.ToNumericResult(result.Judgement.MaxResult); + currentMaximumBaseScore += Judgement.ToNumericResult(maxResult); currentBaseScore += Judgement.ToNumericResult(result.Type); currentAccuracyJudgementCount++; } - if (result.Type.IsBonus()) - currentBonusPortion += GetBonusScoreChange(result); - else - currentComboPortion += GetComboScoreChange(result); + if (result.Type.IsScorable()) + { + if (result.Type.IncreasesCombo()) + Combo.Value++; + else if (result.Type.BreaksCombo()) + Combo.Value = 0; - ApplyScoreChange(result); + result.ComboAfterJudgement = Combo.Value; + + if (result.Type.IsBonus()) + currentBonusPortion += GetBonusScoreChange(result); + else + currentComboPortion += GetComboScoreChange(result); + + ApplyScoreChange(result); + } if (!IsSimulating) { diff --git a/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs b/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs index 9da032e48994..28d664a48bbe 100644 --- a/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs +++ b/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs @@ -23,11 +23,11 @@ protected override void LoadComplete() { base.LoadComplete(); - AccuracyDisplay.BindValueChanged(mod => + AccuracyDisplay.BindValueChanged(mode => { Current.UnbindBindings(); - switch (mod.NewValue) + switch (mode.NewValue) { case AccuracyDisplayMode.Standard: Current.BindTo(scoreProcessor.Accuracy);