mirror of
https://github.com/ppy/osu.git
synced 2026-05-30 17:00:38 +08:00
Use note strains instead of sectional strains
This commit is contained in:
@@ -159,6 +159,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
currentStrain *= strainDecay(current.DeltaTime);
|
||||
currentStrain += strainValueOf(current) * skillMultiplier;
|
||||
|
||||
objectStrains.Add(currentStrain);
|
||||
|
||||
return currentStrain;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
/// </summary>
|
||||
protected virtual double DifficultyMultiplier => 1.06;
|
||||
|
||||
protected List<double> objectStrains = new List<double>();
|
||||
|
||||
protected OsuStrainSkill(Mod[] mods)
|
||||
: base(mods)
|
||||
{
|
||||
@@ -64,10 +66,9 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
/// </summary>
|
||||
public double CountDifficultStrains(double clockRate)
|
||||
{
|
||||
List<double> strains = GetCurrentStrainPeaks().ToList();
|
||||
double topStrain = strains.Max();
|
||||
double topStrain = objectStrains.Max();
|
||||
|
||||
double realtimeCount = strains.Sum(s => Math.Pow(s / topStrain, 4));
|
||||
double realtimeCount = objectStrains.Sum(s => Math.Pow(s / topStrain, 4));
|
||||
return clockRate * realtimeCount;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,11 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
|
||||
currentRhythm = calculateRhythmBonus(current);
|
||||
|
||||
return currentStrain * currentRhythm;
|
||||
double totalStrain = currentStrain * currentRhythm;
|
||||
|
||||
objectStrains.Add(totalStrain);
|
||||
|
||||
return totalStrain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user