mirror of
https://github.com/ppy/osu.git
synced 2025-01-22 22:42:58 +08:00
Merge pull request #2561 from smoogipoo/hitresult-namings
Make OsuPerformanceCalculator use the new hitresult namings
This commit is contained in:
commit
2297a53342
@ -32,9 +32,9 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
|
|
||||||
private double accuracy;
|
private double accuracy;
|
||||||
private int scoreMaxCombo;
|
private int scoreMaxCombo;
|
||||||
private int count300;
|
private int countGreat;
|
||||||
private int count100;
|
private int countGood;
|
||||||
private int count50;
|
private int countMeh;
|
||||||
private int countMiss;
|
private int countMiss;
|
||||||
|
|
||||||
public OsuPerformanceCalculator(Ruleset ruleset, IBeatmap beatmap, Score score)
|
public OsuPerformanceCalculator(Ruleset ruleset, IBeatmap beatmap, Score score)
|
||||||
@ -52,9 +52,9 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
mods = Score.Mods;
|
mods = Score.Mods;
|
||||||
accuracy = Score.Accuracy;
|
accuracy = Score.Accuracy;
|
||||||
scoreMaxCombo = Score.MaxCombo;
|
scoreMaxCombo = Score.MaxCombo;
|
||||||
count300 = Convert.ToInt32(Score.Statistics[HitResult.Great]);
|
countGreat = Convert.ToInt32(Score.Statistics[HitResult.Great]);
|
||||||
count100 = Convert.ToInt32(Score.Statistics[HitResult.Good]);
|
countGood = Convert.ToInt32(Score.Statistics[HitResult.Good]);
|
||||||
count50 = Convert.ToInt32(Score.Statistics[HitResult.Meh]);
|
countMeh = Convert.ToInt32(Score.Statistics[HitResult.Meh]);
|
||||||
countMiss = Convert.ToInt32(Score.Statistics[HitResult.Miss]);
|
countMiss = Convert.ToInt32(Score.Statistics[HitResult.Miss]);
|
||||||
|
|
||||||
// Don't count scores made with supposedly unranked mods
|
// Don't count scores made with supposedly unranked mods
|
||||||
@ -71,10 +71,10 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
ar = Math.Max(0, ar / 2);
|
ar = Math.Max(0, ar / 2);
|
||||||
|
|
||||||
double preEmpt = BeatmapDifficulty.DifficultyRange(ar, 1800, 1200, 450) / TimeRate;
|
double preEmpt = BeatmapDifficulty.DifficultyRange(ar, 1800, 1200, 450) / TimeRate;
|
||||||
double hitWindow300 = (Beatmap.HitObjects.First().HitWindows.Great / 2 - 0.5) / TimeRate;
|
double hitWindowGreat = (Beatmap.HitObjects.First().HitWindows.Great / 2 - 0.5) / TimeRate;
|
||||||
|
|
||||||
realApproachRate = preEmpt > 1200 ? (1800 - preEmpt) / 120 : (1200 - preEmpt) / 150 + 5;
|
realApproachRate = preEmpt > 1200 ? (1800 - preEmpt) / 120 : (1200 - preEmpt) / 150 + 5;
|
||||||
realOverallDifficulty = (80 - 0.5 - hitWindow300) / 6;
|
realOverallDifficulty = (80 - 0.5 - hitWindowGreat) / 6;
|
||||||
|
|
||||||
// Custom multipliers for NoFail and SpunOut.
|
// Custom multipliers for NoFail and SpunOut.
|
||||||
double multiplier = 1.12f; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things
|
double multiplier = 1.12f; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things
|
||||||
@ -190,7 +190,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
int amountHitObjectsWithAccuracy = countHitCircles;
|
int amountHitObjectsWithAccuracy = countHitCircles;
|
||||||
|
|
||||||
if (amountHitObjectsWithAccuracy > 0)
|
if (amountHitObjectsWithAccuracy > 0)
|
||||||
betterAccuracyPercentage = ((count300 - (totalHits - amountHitObjectsWithAccuracy)) * 6 + count100 * 2 + count50) / (amountHitObjectsWithAccuracy * 6);
|
betterAccuracyPercentage = ((countGreat - (totalHits - amountHitObjectsWithAccuracy)) * 6 + countGood * 2 + countMeh) / (amountHitObjectsWithAccuracy * 6);
|
||||||
else
|
else
|
||||||
betterAccuracyPercentage = 0;
|
betterAccuracyPercentage = 0;
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
|||||||
return accuracyValue;
|
return accuracyValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private double totalHits => count300 + count100 + count50 + countMiss;
|
private double totalHits => countGreat + countGood + countMeh + countMiss;
|
||||||
private double totalSuccessfulHits => count300 + count100 + count50;
|
private double totalSuccessfulHits => countGreat + countGood + countMeh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user