1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-18 19:43:03 +08:00

Merge pull request #7 from TextAdventurer12/no-combo-scaling

Fix adding a diffspike reducing PP
This commit is contained in:
apollo-dw 2024-05-11 13:23:55 +01:00 committed by GitHub
commit 1d19bd2e34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,6 +37,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
protected virtual double DifficultyMultiplier => DEFAULT_DIFFICULTY_MULTIPLIER;
protected List<double> objectStrains = new List<double>();
protected double difficulty;
protected OsuStrainSkill(Mod[] mods)
: base(mods)
@ -45,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
public override double DifficultyValue()
{
double difficulty = 0;
difficulty = 0;
double weight = 1;
// Sections with 0 strain are excluded to avoid worst-case time complexity of the following sort (e.g. /b/2351871).
@ -78,9 +79,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
/// </summary>
public double CountDifficultStrains()
{
double topStrain = objectStrains.Max();
return objectStrains.Sum(s => Math.Pow(s / topStrain, 4));
double consistentTopStrain = difficulty / 10; // What would the top strain be if all strain values were identical
// Use a weighted sum of all strains. Constants are arbitrary and give nice values
return objectStrains.Sum(s => 1.1 / (1 + Math.Exp(-10 * (s / consistentTopStrain - 0.88))));
}
}
}
}