mirror of https://github.com/ppy/osu
Merge pull request #27063 from tsunyoku/account-for-sliders-in-accuracy-pp
Include sliders in accuracy pp if slider head accuracy is in use
This commit is contained in:
commit
9a8a5cd45d
|
@ -16,6 +16,8 @@ public class OsuPerformanceCalculator : PerformanceCalculator
|
|||
{
|
||||
public const double PERFORMANCE_BASE_MULTIPLIER = 1.15; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things.
|
||||
|
||||
private bool usingClassicSliderAccuracy;
|
||||
|
||||
private double accuracy;
|
||||
private int scoreMaxCombo;
|
||||
private int countGreat;
|
||||
|
@ -34,6 +36,8 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
|
|||
{
|
||||
var osuAttributes = (OsuDifficultyAttributes)attributes;
|
||||
|
||||
usingClassicSliderAccuracy = score.Mods.OfType<OsuModClassic>().Any(m => m.NoSliderHeadAccuracy.Value);
|
||||
|
||||
accuracy = score.Accuracy;
|
||||
scoreMaxCombo = score.MaxCombo;
|
||||
countGreat = score.Statistics.GetValueOrDefault(HitResult.Great);
|
||||
|
@ -193,6 +197,8 @@ private double computeAccuracyValue(ScoreInfo score, OsuDifficultyAttributes att
|
|||
// This percentage only considers HitCircles of any value - in this part of the calculation we focus on hitting the timing hit window.
|
||||
double betterAccuracyPercentage;
|
||||
int amountHitObjectsWithAccuracy = attributes.HitCircleCount;
|
||||
if (!usingClassicSliderAccuracy)
|
||||
amountHitObjectsWithAccuracy += attributes.SliderCount;
|
||||
|
||||
if (amountHitObjectsWithAccuracy > 0)
|
||||
betterAccuracyPercentage = ((countGreat - (totalHits - amountHitObjectsWithAccuracy)) * 6 + countOk * 2 + countMeh) / (double)(amountHitObjectsWithAccuracy * 6);
|
||||
|
|
Loading…
Reference in New Issue