mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +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)
|
if (travelLength < DistanceBetweenTicks)
|
||||||
travelLength = DistanceBetweenTicks;
|
travelLength = DistanceBetweenTicks;
|
||||||
|
|
||||||
if (LimitedDistanceSnap.Value)
|
float snappedDistance = LimitedDistanceSnap.Value
|
||||||
travelLength = SnapProvider.DurationToDistance(ReferenceObject, editorClock.CurrentTime - ReferenceObject.GetEndTime());
|
? SnapProvider.DurationToDistance(ReferenceObject, editorClock.CurrentTime - ReferenceObject.GetEndTime())
|
||||||
|
// When interacting with the resolved snap provider, the distance spacing multiplier should first be removed
|
||||||
// When interacting with the resolved snap provider, the distance spacing multiplier should first be removed
|
// to allow for snapping at a non-multiplied ratio.
|
||||||
// to allow for snapping at a non-multiplied ratio.
|
: SnapProvider.FindSnappedDistance(ReferenceObject, travelLength / distanceSpacingMultiplier);
|
||||||
float snappedDistance = SnapProvider.FindSnappedDistance(ReferenceObject, travelLength / distanceSpacingMultiplier);
|
|
||||||
|
|
||||||
double snappedTime = StartTime + SnapProvider.DistanceToDuration(ReferenceObject, snappedDistance);
|
double snappedTime = StartTime + SnapProvider.DistanceToDuration(ReferenceObject, snappedDistance);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user