mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Automatically set slider velocity from juice stream path
This commit is contained in:
@ -207,6 +207,11 @@ namespace osu.Game.Rulesets.Catch.Objects
|
||||
{
|
||||
double xDifference = Math.Abs((double)vertices[i].X - vertices[i - 1].X);
|
||||
double timeDifference = vertices[i].Time - vertices[i - 1].Time;
|
||||
|
||||
// A short segment won't affect the resulting path much anyways so ignore it to avoid divide-by-zero.
|
||||
if (Precision.AlmostEquals(timeDifference, 0))
|
||||
continue;
|
||||
|
||||
maximumSlope = Math.Max(maximumSlope, xDifference / timeDifference);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user