mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:33:20 +08:00
Fix incorrect mapping when distance spacing is not 1.0x
This commit is contained in:
parent
003949ac4e
commit
36954e55ad
@ -101,12 +101,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
if (travelLength < DistanceBetweenTicks)
|
||||
travelLength = DistanceBetweenTicks;
|
||||
|
||||
if (LimitedDistanceSnap.Value)
|
||||
travelLength = SnapProvider.DurationToDistance(ReferenceObject, editorClock.CurrentTime - ReferenceObject.GetEndTime());
|
||||
|
||||
// When interacting with the resolved snap provider, the distance spacing multiplier should first be removed
|
||||
// to allow for snapping at a non-multiplied ratio.
|
||||
float snappedDistance = SnapProvider.FindSnappedDistance(ReferenceObject, travelLength / distanceSpacingMultiplier);
|
||||
float snappedDistance = LimitedDistanceSnap.Value
|
||||
? SnapProvider.DurationToDistance(ReferenceObject, editorClock.CurrentTime - ReferenceObject.GetEndTime())
|
||||
// When interacting with the resolved snap provider, the distance spacing multiplier should first be removed
|
||||
// to allow for snapping at a non-multiplied ratio.
|
||||
: SnapProvider.FindSnappedDistance(ReferenceObject, travelLength / distanceSpacingMultiplier);
|
||||
|
||||
double snappedTime = StartTime + SnapProvider.DistanceToDuration(ReferenceObject, snappedDistance);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user