1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-27 12:50:20 +08:00

snap the slider duration in normal drag

This commit is contained in:
OliBomby
2024-08-21 12:28:56 +02:00
Unverified
parent 0c6bee4033
commit 094b184191
@@ -265,6 +265,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
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);
}