mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:15:45 +08:00
Fix osu!mania editor placement regressions
This commit is contained in:
parent
c46bfc2532
commit
ffb8d48fc3
@ -63,7 +63,7 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
drawableRuleset.ScrollingInfo.TimeRange.Value,
|
||||
hoc.DrawHeight);
|
||||
|
||||
return new SnapResult(targetPosition, targetTime);
|
||||
return new SnapResult(screenSpacePosition, targetTime);
|
||||
}
|
||||
|
||||
protected override DrawableRuleset<ManiaHitObject> CreateDrawableRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
|
||||
|
@ -269,7 +269,9 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
if (distanceSnapGrid == null) return new SnapResult(screenSpacePosition, null);
|
||||
|
||||
// TODO: move distance snap grid to OsuHitObjectComposer.
|
||||
(Vector2 pos, double time) = distanceSnapGrid.GetSnappedPosition(distanceSnapGrid.ToLocalSpace(screenSpacePosition));
|
||||
|
||||
return new SnapResult(distanceSnapGrid.ToScreenSpace(pos), time);
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
private void updatePlacementPosition(Vector2 screenSpacePosition)
|
||||
{
|
||||
Vector2 snappedPlayfieldPosition = composer.SnapScreenSpacePositionToValidTime(screenSpacePosition).ScreenSpacePosition;
|
||||
var snapResult = composer.SnapScreenSpacePositionToValidTime(screenSpacePosition);
|
||||
|
||||
currentPlacement.UpdatePosition(ToScreenSpace(snappedPlayfieldPosition));
|
||||
currentPlacement.UpdatePosition(snapResult.ScreenSpacePosition);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user