added rhythm multiplier for strain sections

This commit is contained in:
emu1337 2021-08-15 20:48:00 +02:00
parent ce7ff04512
commit 29a22bd11f
2 changed files with 21 additions and 1 deletions

View File

@ -34,6 +34,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{
}
private double calculateRhythmBonus(double time)
{
return 1.0;
}
protected override double StrainValueOf(DifficultyHitObject current)
{
if (current.BaseObject is Spinner)
@ -66,5 +72,14 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
return (1 + (speedBonus - 1) * 0.75) * angleBonus * (0.95 + speedBonus * Math.Pow(distance / single_spacing_threshold, 3.5)) / osuCurrent.StrainTime;
}
protected override double GetTotalCurrentStrain(DifficultyHitObject current)
{
return base.GetTotalCurrentStrain(current) * calculateRhythmBonus(current.StartTime);
}
protected override double GetPeakStrain(double time)
{
return base.GetPeakStrain(time) * calculateRhythmBonus(time);
}
}
}

View File

@ -71,7 +71,12 @@ namespace osu.Game.Rulesets.Difficulty.Skills
CurrentStrain *= strainDecay(current.DeltaTime);
CurrentStrain += StrainValueOf(current) * SkillMultiplier;
currentSectionPeak = Math.Max(CurrentStrain, currentSectionPeak);
currentSectionPeak = Math.Max(GetTotalCurrentStrain(current), currentSectionPeak);
}
protected virtual double GetTotalCurrentStrain(DifficultyHitObject current)
{
return CurrentStrain;
}
/// <summary>