1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-03 03:20:16 +08:00

Make ScoreProcessor write all judgement types

This commit is contained in:
Dan Balasescu
2022-01-31 18:43:10 +09:00
Unverified
parent 0458d408bb
commit 39e1d65976
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ namespace osu.Game.Rulesets.Scoring
/// <summary>
/// An array of all scorable <see cref="HitResult"/>s.
/// </summary>
public static readonly HitResult[] SCORABLE_TYPES = ((HitResult[])Enum.GetValues(typeof(HitResult))).Where(r => r.IsScorable()).ToArray();
public static readonly HitResult[] ALL_TYPES = ((HitResult[])Enum.GetValues(typeof(HitResult))).ToArray();
/// <summary>
/// Whether a <see cref="HitResult"/> is valid within a given <see cref="HitResult"/> range.
+5 -5
View File
@@ -125,6 +125,8 @@ namespace osu.Game.Rulesets.Scoring
if (result.FailedAtJudgement)
return;
scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) + 1;
if (!result.Type.IsScorable())
return;
@@ -151,8 +153,6 @@ namespace osu.Game.Rulesets.Scoring
rollingMaxBaseScore += result.Judgement.MaxNumericResult;
}
scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) + 1;
hitEvents.Add(CreateHitEvent(result));
lastHitObject = result.HitObject;
@@ -175,6 +175,8 @@ namespace osu.Game.Rulesets.Scoring
if (result.FailedAtJudgement)
return;
scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) - 1;
if (!result.Type.IsScorable())
return;
@@ -186,8 +188,6 @@ namespace osu.Game.Rulesets.Scoring
rollingMaxBaseScore -= result.Judgement.MaxNumericResult;
}
scoreResultCounts[result.Type] = scoreResultCounts.GetValueOrDefault(result.Type) - 1;
Debug.Assert(hitEvents.Count > 0);
lastHitObject = hitEvents[^1].LastHitObject;
hitEvents.RemoveAt(hitEvents.Count - 1);
@@ -346,7 +346,7 @@ namespace osu.Game.Rulesets.Scoring
score.Accuracy = Accuracy.Value;
score.Rank = Rank.Value;
foreach (var result in HitResultExtensions.SCORABLE_TYPES)
foreach (var result in HitResultExtensions.ALL_TYPES)
score.Statistics[result] = GetStatistic(result);
score.HitEvents = hitEvents;