1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 08:27:49 +08:00

Add back minimum/maximum accuracy

This commit is contained in:
Dan Balasescu 2023-05-23 18:15:32 +09:00
parent 3598ca9125
commit d45b54399b

View File

@ -109,6 +109,11 @@ namespace osu.Game.Rulesets.Scoring
/// </remarks>
private double currentBaseScore;
/// <summary>
/// The maximum sum of all accuracy-affecting judgements in the beatmap.
/// </summary>
private double maximumBaseScore;
/// <summary>
/// The count of all accuracy-affecting judgements in the beatmap.
/// </summary>
@ -284,6 +289,8 @@ namespace osu.Game.Rulesets.Scoring
private void updateScore()
{
Accuracy.Value = currentMaximumBaseScore > 0 ? currentBaseScore / currentMaximumBaseScore : 1;
MinimumAccuracy.Value = maximumBaseScore > 0 ? currentBaseScore / maximumBaseScore : 0;
MaximumAccuracy.Value = maximumBaseScore > 0 ? (currentBaseScore + (maximumBaseScore - currentMaximumBaseScore)) / maximumBaseScore : 1;
double comboProgress = maximumComboPortion > 0 ? currentComboPortion / maximumComboPortion : 1;
double accuracyProcess = maximumCountAccuracyJudgements > 0 ? (double)currentCountAccuracyJudgements / maximumCountAccuracyJudgements : 1;
@ -311,6 +318,8 @@ namespace osu.Game.Rulesets.Scoring
if (storeResults)
{
maximumBaseScore = currentBaseScore;
maximumComboPortion = currentComboPortion;
maximumCountAccuracyJudgements = currentCountAccuracyJudgements;
@ -334,9 +343,6 @@ namespace osu.Game.Rulesets.Scoring
Rank.Disabled = false;
Rank.Value = ScoreRank.X;
HighestCombo.Value = 0;
currentBaseScore = 0;
currentMaximumBaseScore = 0;
}
/// <summary>