Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slider MinimumJumpDistance being calculated too low to be possible #30036

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,23 @@ private void setDistances(double clockRate)

float tailJumpDistance = Vector2.Subtract(lastSlider.TailCircle.StackedPosition, BaseObject.StackedPosition).Length * scalingFactor;
MinimumJumpDistance = Math.Max(0, Math.Min(LazyJumpDistance - (maximum_slider_radius - assumed_slider_radius), tailJumpDistance - maximum_slider_radius));

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

if (MinimumJumpDistance < distanceBetweenStartPositions && LazyJumpDistance >= distanceBetweenStartPositions)
Copy link
Contributor

@Givikap120 Givikap120 Oct 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like increasing slider length by 1px can nuke pp, because lazy jump distance would slightly lower than normal distance now

{
// 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.
//
// o---<s===> ← slider (s - start, length smaller than the followcircle)
// ↑
// next object
//
// In this case MinimumJumpDistance is calculated to be less than the jump from start of the object to the start of the next one which is impossible.
// Therefore, we set minimal distance and time to be that of a normal start-to-start jump.

MinimumJumpTime = StrainTime;
MinimumJumpDistance = distanceBetweenStartPositions;
}
}

if (lastLastObject != null && !(lastLastObject is Spinner))
Expand Down
Loading