snap the slider duration in normal drag

This commit is contained in:
OliBomby 2024-08-21 12:28:56 +02:00
parent 0c6bee4033
commit 094b184191
1 changed files with 2 additions and 0 deletions

View File

@ -265,6 +265,8 @@ private void adjustLength(double proposedDistance, bool adjustVelocity)
else
{
double minDistance = distanceSnapProvider?.GetBeatSnapDistanceAt(HitObject, false) * oldVelocityMultiplier ?? 1;
// Add a small amount to the proposed distance to make it easier to snap to the full length of the slider.
proposedDistance = distanceSnapProvider?.FindSnappedDistance(HitObject, (float)proposedDistance + 1) ?? proposedDistance;
proposedDistance = MathHelper.Clamp(proposedDistance, minDistance, HitObject.Path.CalculatedDistance);
}