1
0
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:
Dean Herbert 2020-05-20 18:32:36 +09:00
parent c46bfc2532
commit ffb8d48fc3
3 changed files with 5 additions and 3 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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