1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 05:29:57 +08:00

Add bool useSliderHead

This commit is contained in:
Fina
2024-04-19 16:00:31 -07:00
Unverified
parent dd17c898b3
commit ca246015d5
@@ -15,6 +15,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{
public const double PERFORMANCE_BASE_MULTIPLIER = 1.14; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things.
private bool useSliderHead;
private double accuracy;
private int scoreMaxCombo;
private int countGreat;
@@ -35,6 +37,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty
{
var osuAttributes = (OsuDifficultyAttributes)attributes;
useSliderHead = !score.Mods.Any(h => h is OsuModClassic cl && cl.NoSliderHeadAccuracy.Value);
accuracy = score.Accuracy;
scoreMaxCombo = score.MaxCombo;
countGreat = score.Statistics.GetValueOrDefault(HitResult.Great);
@@ -42,13 +46,15 @@ namespace osu.Game.Rulesets.Osu.Difficulty
countMeh = score.Statistics.GetValueOrDefault(HitResult.Meh);
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
countLargeTickMiss = score.Statistics.GetValueOrDefault(HitResult.LargeTickMiss);
countSliderEndsDropped = score.Statistics.GetValueOrDefault(HitResult.SmallTickMiss);
if (!score.Mods.Any(h => h is OsuModClassic cl && cl.NoSliderHeadAccuracy.Value))
effectiveMissCount = countMiss;
if (useSliderHead)
countSliderEndsDropped = osuAttributes.SliderCount - score.Statistics.GetValueOrDefault(HitResult.SliderTailHit);
if (useSliderHead)
effectiveMissCount = countMiss;
else
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
if (score.Mods.Any(m => m is OsuModNoFail))
@@ -131,7 +137,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
if (attributes.SliderCount > 0)
{
double estimateSliderEndsDropped;
if (score.IsLegacyScore)
if (useSliderHead)
estimateSliderEndsDropped = Math.Clamp(Math.Min(countOk + countMeh + countMiss, attributes.MaxCombo - scoreMaxCombo), 0, estimateDifficultSliders);
else
estimateSliderEndsDropped = countSliderEndsDropped;