1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Replicate integer calculations for catch hyperdash generation

This commit is contained in:
Dan Balasescu 2023-12-04 14:32:14 +09:00
parent c755bcbec4
commit 6f73d78bc9
No known key found for this signature in database

View File

@ -247,7 +247,7 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
currentObject.DistanceToHyperDash = 0;
int thisDirection = nextObject.EffectiveX > currentObject.EffectiveX ? 1 : -1;
double timeToNext = nextObject.StartTime - currentObject.StartTime - 1000f / 60f / 4; // 1/4th of a frame of grace time, taken from osu-stable
double timeToNext = (int)nextObject.StartTime - (int)currentObject.StartTime - 1000f / 60f / 4; // 1/4th of a frame of grace time, taken from osu-stable
double distanceToNext = Math.Abs(nextObject.EffectiveX - currentObject.EffectiveX) - (lastDirection == thisDirection ? lastExcess : halfCatcherWidth);
float distanceToHyper = (float)(timeToNext * Catcher.BASE_DASH_SPEED - distanceToNext);