1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

velocity buff isolation + small refactor

This commit is contained in:
Xexxar 2021-09-25 03:27:07 +00:00
parent 587cf09d2a
commit 010078778e

View File

@ -29,6 +29,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
private const double wide_angle_multiplier = 1.0; private const double wide_angle_multiplier = 1.0;
private const double acute_angle_multiplier = 1.0; private const double acute_angle_multiplier = 1.0;
private const double rhythm_variance_multiplier = 1.0; private const double rhythm_variance_multiplier = 1.0;
private const double vel_change_multiplier = 2.0;
protected override double StrainValueOf(DifficultyHitObject current) protected override double StrainValueOf(DifficultyHitObject current)
{ {
@ -73,6 +74,13 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
// add in angle velocity. // add in angle velocity.
aimStrain += angleBonus; aimStrain += angleBonus;
} }
if (prevVector.Length > currVector.Length)
{
double velChangeBonus = Math.Max(0, Math.Sqrt((prevVector.Length - currVector.Length) * currVector.Length) - Math.Max(0, currVector.Length - 100 / osuCurrObj.StrainTime)) * Math.Min(1, osuCurrObj.JumpDistance / 100);
aimStrain += velChangeBonus * vel_change_multiplier;
}
} }
else // There is a rhythm change else // There is a rhythm change
{ {