diff --git a/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs b/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs index fd041d3dd0..d883b91abc 100644 --- a/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs +++ b/osu.Game.Tests/Rulesets/Scoring/ScoreProcessorTest.cs @@ -356,6 +356,27 @@ namespace osu.Game.Tests.Rulesets.Scoring Assert.That(actual, Is.EqualTo(expected).Within(Precision.FLOAT_EPSILON)); } + [TestCase(HitResult.Great)] + [TestCase(HitResult.LargeTickHit)] + public void TestAccuracyUpdateFromIgnoreMiss(HitResult maxResult) + { + scoreProcessor.ApplyBeatmap(new Beatmap + { + HitObjects = + { + new TestHitObject(maxResult, HitResult.IgnoreMiss) + } + }); + + var judgementResult = new JudgementResult(beatmap.HitObjects.Single(), new TestJudgement(maxResult, HitResult.IgnoreMiss)) + { + Type = HitResult.IgnoreMiss + }; + scoreProcessor.ApplyResult(judgementResult); + + Assert.That(scoreProcessor.Accuracy.Value, Is.Not.EqualTo(1)); + } + private class TestJudgement : Judgement { public override HitResult MaxResult { get; } diff --git a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs index baeddbd0e8..f110172988 100644 --- a/osu.Game/Rulesets/Scoring/ScoreProcessor.cs +++ b/osu.Game/Rulesets/Scoring/ScoreProcessor.cs @@ -218,9 +218,6 @@ namespace osu.Game.Rulesets.Scoring scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) + 1; - if (!result.Type.IsScorable()) - return; - if (result.Type.IncreasesCombo()) Combo.Value++; else if (result.Type.BreaksCombo()) @@ -228,16 +225,18 @@ namespace osu.Game.Rulesets.Scoring result.ComboAfterJudgement = Combo.Value; - if (result.Type.AffectsAccuracy()) + if (result.Judgement.MaxResult.AffectsAccuracy()) { currentMaximumBaseScore += Judgement.ToNumericResult(result.Judgement.MaxResult); - currentBaseScore += Judgement.ToNumericResult(result.Type); currentAccuracyJudgementCount++; } + if (result.Type.AffectsAccuracy()) + currentBaseScore += Judgement.ToNumericResult(result.Type); + if (result.Type.IsBonus()) currentBonusPortion += GetBonusScoreChange(result); - else + else if (result.Type.IsScorable()) currentComboPortion += GetComboScoreChange(result); ApplyScoreChange(result); @@ -275,19 +274,18 @@ namespace osu.Game.Rulesets.Scoring scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) - 1; - if (!result.Type.IsScorable()) - return; - - if (result.Type.AffectsAccuracy()) + if (result.Judgement.MaxResult.AffectsAccuracy()) { currentMaximumBaseScore -= Judgement.ToNumericResult(result.Judgement.MaxResult); - currentBaseScore -= Judgement.ToNumericResult(result.Type); currentAccuracyJudgementCount--; } + if (result.Type.AffectsAccuracy()) + currentBaseScore -= Judgement.ToNumericResult(result.Type); + if (result.Type.IsBonus()) currentBonusPortion -= GetBonusScoreChange(result); - else + else if (result.Type.IsScorable()) currentComboPortion -= GetComboScoreChange(result); RemoveScoreChange(result); diff --git a/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs b/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs index 9da032e489..28d664a48b 100644 --- a/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs +++ b/osu.Game/Screens/Play/HUD/GameplayAccuracyCounter.cs @@ -23,11 +23,11 @@ namespace osu.Game.Screens.Play.HUD { base.LoadComplete(); - AccuracyDisplay.BindValueChanged(mod => + AccuracyDisplay.BindValueChanged(mode => { Current.UnbindBindings(); - switch (mod.NewValue) + switch (mode.NewValue) { case AccuracyDisplayMode.Standard: Current.BindTo(scoreProcessor.Accuracy);