1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:33:22 +08:00

removed speed object count independene from distance

This commit is contained in:
Givikap120 2024-06-28 00:14:30 +03:00
parent 588a98335b
commit 2f94eea950

View File

@ -22,14 +22,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
private double strainDecayBase => 0.3;
private double currentStrain;
private double currentStrainNoDistance;
private double currentRhythm;
protected override int ReducedSectionCount => 5;
protected override double DifficultyMultiplier => 1.04;
// Used to calculate acc punishment
private readonly List<double> objectStrainsNoDistance = new List<double>();
private readonly List<double> objectStrains = new List<double>();
public Speed(Mod[] mods)
: base(mods)
@ -45,34 +44,25 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
currentStrain *= strainDecay(((OsuDifficultyHitObject)current).StrainTime);
currentStrain += SpeedEvaluator.EvaluateDifficultyOf(current) * skillMultiplier;
// Disregard distance when computing the number of speed notes.
double travelDistance = current.Index > 0 ? ((OsuDifficultyHitObject)current.Previous(0)).TravelDistance : 0;
double distance = Math.Min(125, travelDistance + ((OsuDifficultyHitObject)current).MinimumJumpDistance);
currentStrainNoDistance *= strainDecay(((OsuDifficultyHitObject)current).StrainTime);
currentStrainNoDistance += SpeedEvaluator.EvaluateDifficultyOf(current) / (1 + Math.Pow(distance / 125, 3.5)) * skillMultiplier;
currentRhythm = RhythmEvaluator.EvaluateDifficultyOf(current);
double totalStrain = currentStrain * currentRhythm;
double totalStrainNoDistance = currentStrainNoDistance * currentRhythm;
objectStrainsNoDistance.Add(totalStrainNoDistance);
objectStrains.Add(totalStrain);
return totalStrain;
}
public double RelevantNoteCount()
{
if (objectStrainsNoDistance.Count == 0)
if (objectStrains.Count == 0)
return 0;
double maxStrain = objectStrainsNoDistance.Max();
double maxStrain = objectStrains.Max();
if (maxStrain == 0)
return 0;
return objectStrainsNoDistance.Sum(strain => 1.0 / (1.0 + Math.Exp(-(strain / maxStrain * 12.0 - 6.0))));
return objectStrains.Sum(strain => 1.0 / (1.0 + Math.Exp(-(strain / maxStrain * 12.0 - 6.0))));
}
}
}