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

Add some comments where truncations were added

This commit is contained in:
Dan Balasescu 2023-12-06 14:50:03 +09:00
parent 40ff95d586
commit 394ea73055
No known key found for this signature in database
2 changed files with 3 additions and 0 deletions

View File

@ -247,6 +247,8 @@ namespace osu.Game.Rulesets.Catch.Beatmaps
currentObject.DistanceToHyperDash = 0; currentObject.DistanceToHyperDash = 0;
int thisDirection = nextObject.EffectiveX > currentObject.EffectiveX ? 1 : -1; int thisDirection = nextObject.EffectiveX > currentObject.EffectiveX ? 1 : -1;
// Int truncation added to match 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 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); double distanceToNext = Math.Abs(nextObject.EffectiveX - currentObject.EffectiveX) - (lastDirection == thisDirection ? lastExcess : halfCatcherWidth);
float distanceToHyper = (float)(timeToNext * Catcher.BASE_DASH_SPEED - distanceToNext); float distanceToHyper = (float)(timeToNext * Catcher.BASE_DASH_SPEED - distanceToNext);

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Catch.Objects
private void createBananas(CancellationToken cancellationToken) private void createBananas(CancellationToken cancellationToken)
{ {
// Int truncation added to match osu!stable.
int startTime = (int)StartTime; int startTime = (int)StartTime;
int endTime = (int)EndTime; int endTime = (int)EndTime;
float spacing = (float)(EndTime - StartTime); float spacing = (float)(EndTime - StartTime);