mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 17:53:15 +08:00
Make sure distance is clamped to sane values
This commit is contained in:
parent
47721f7a07
commit
00a4d60e89
@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
|
|
||||||
protected override double StrainValueOf(OsuDifficultyHitObject current)
|
protected override double StrainValueOf(OsuDifficultyHitObject current)
|
||||||
{
|
{
|
||||||
double distance = current.TravelDistance + current.JumpDistance;
|
double distance = Math.Min(SINGLE_SPACING_THRESHOLD, current.TravelDistance + current.JumpDistance);
|
||||||
return (0.95 + Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 4)) / current.StrainTime;
|
return (0.95 + Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 4)) / current.StrainTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user