Skip to content

Commit

Permalink
Change MinimumJumpDistance to be a minimum between LazyJumpDistance a…
Browse files Browse the repository at this point in the history
…nd distanceBetweenStartPositions for close-to-zero cases
  • Loading branch information
stanriders committed Dec 10, 2024
1 parent 8d215cd commit 7765c2f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private void setDistances(double clockRate)

float distanceBetweenStartPositions = (BaseObject.StackedPosition * scalingFactor - lastObject.StackedPosition * scalingFactor).Length;

if (MinimumJumpDistance < distanceBetweenStartPositions && LazyJumpDistance >= distanceBetweenStartPositions)
if (MinimumJumpDistance < distanceBetweenStartPositions)
{
// MinimumJumpDistance can be sometimes calculated to be ~0 in cases where the player wouldn't move the cursor anywhere and treat the slider as just a normal circle.
//
Expand All @@ -230,7 +230,7 @@ private void setDistances(double clockRate)
// Therefore, we set minimal distance and time to be that of a normal start-to-start jump.

MinimumJumpTime = StrainTime;
MinimumJumpDistance = distanceBetweenStartPositions;
MinimumJumpDistance = Math.Min(LazyJumpDistance, distanceBetweenStartPositions);
}
}

Expand Down

0 comments on commit 7765c2f

Please sign in to comment.