mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 06:52:55 +08:00
Renamed useSliderHead to useClassicSlider (and refactored code accordingly)
This commit is contained in:
parent
d1dcac08c6
commit
4fe55d437a
@ -15,7 +15,7 @@ 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 bool useClassicSlider;
|
||||
|
||||
private double accuracy;
|
||||
private int scoreMaxCombo;
|
||||
@ -36,6 +36,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo score, DifficultyAttributes attributes)
|
||||
{
|
||||
var osuAttributes = (OsuDifficultyAttributes)attributes;
|
||||
useClassicSlider = score.Mods.Any(h => h is OsuModClassic cl && cl.NoSliderHeadAccuracy.Value);
|
||||
|
||||
accuracy = score.Accuracy;
|
||||
scoreMaxCombo = score.MaxCombo;
|
||||
@ -45,13 +46,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
countMiss = score.Statistics.GetValueOrDefault(HitResult.Miss);
|
||||
countLargeTickMiss = score.Statistics.GetValueOrDefault(HitResult.LargeTickMiss);
|
||||
|
||||
if (useSliderHead)
|
||||
if (!useClassicSlider)
|
||||
countSliderEndsDropped = osuAttributes.SliderCount - score.Statistics.GetValueOrDefault(HitResult.SliderTailHit);
|
||||
|
||||
if (useSliderHead)
|
||||
effectiveMissCount = countMiss;
|
||||
else
|
||||
if (useClassicSlider)
|
||||
effectiveMissCount = calculateEffectiveMissCount(osuAttributes);
|
||||
else
|
||||
effectiveMissCount = countMiss;
|
||||
|
||||
double multiplier = PERFORMANCE_BASE_MULTIPLIER;
|
||||
|
||||
@ -135,7 +136,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
if (attributes.SliderCount > 0)
|
||||
{
|
||||
double estimateSliderEndsDropped;
|
||||
if (useSliderHead)
|
||||
if (useClassicSlider)
|
||||
estimateSliderEndsDropped = Math.Clamp(Math.Min(countOk + countMeh + countMiss, attributes.MaxCombo - scoreMaxCombo), 0, estimateDifficultSliders);
|
||||
else
|
||||
estimateSliderEndsDropped = Math.Min(countSliderEndsDropped + countLargeTickMiss, estimateDifficultSliders);
|
||||
|
Loading…
Reference in New Issue
Block a user