mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 11:02:57 +08:00
Merge pull request #31453 from bdach/fix-juice-stream-placement-offset
Fix juice stream placement blueprint being initially visually offset
This commit is contained in:
commit
2133ac6d01
@ -88,10 +88,9 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
|
||||
switch (PlacementActive)
|
||||
{
|
||||
case PlacementState.Waiting:
|
||||
if (!(result.Time is double snappedTime)) return;
|
||||
|
||||
HitObject.OriginalX = ToLocalSpace(result.ScreenSpacePosition).X;
|
||||
HitObject.StartTime = snappedTime;
|
||||
if (result.Time is double snappedTime)
|
||||
HitObject.StartTime = snappedTime;
|
||||
break;
|
||||
|
||||
case PlacementState.Active:
|
||||
@ -107,21 +106,13 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
|
||||
Vector2 startPosition = CatchHitObjectUtils.GetStartPosition(HitObjectContainer, HitObject);
|
||||
editablePath.Position = nestedOutlineContainer.Position = scrollingPath.Position = startPosition;
|
||||
|
||||
updateHitObjectFromPath();
|
||||
}
|
||||
if (lastEditablePathId != editablePath.PathId)
|
||||
editablePath.UpdateHitObjectFromPath(HitObject);
|
||||
lastEditablePathId = editablePath.PathId;
|
||||
|
||||
private void updateHitObjectFromPath()
|
||||
{
|
||||
if (lastEditablePathId == editablePath.PathId)
|
||||
return;
|
||||
|
||||
editablePath.UpdateHitObjectFromPath(HitObject);
|
||||
ApplyDefaultsToHitObject();
|
||||
|
||||
scrollingPath.UpdatePathFrom(HitObjectContainer, HitObject);
|
||||
nestedOutlineContainer.UpdateNestedObjectsFrom(HitObjectContainer, HitObject);
|
||||
|
||||
lastEditablePathId = editablePath.PathId;
|
||||
}
|
||||
|
||||
private double positionToTime(float relativeYPosition)
|
||||
|
Loading…
Reference in New Issue
Block a user