mirror of
https://github.com/ppy/osu.git
synced 2025-01-18 18:12:55 +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,9 +88,8 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
|
|||||||
switch (PlacementActive)
|
switch (PlacementActive)
|
||||||
{
|
{
|
||||||
case PlacementState.Waiting:
|
case PlacementState.Waiting:
|
||||||
if (!(result.Time is double snappedTime)) return;
|
|
||||||
|
|
||||||
HitObject.OriginalX = ToLocalSpace(result.ScreenSpacePosition).X;
|
HitObject.OriginalX = ToLocalSpace(result.ScreenSpacePosition).X;
|
||||||
|
if (result.Time is double snappedTime)
|
||||||
HitObject.StartTime = snappedTime;
|
HitObject.StartTime = snappedTime;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -107,21 +106,13 @@ namespace osu.Game.Rulesets.Catch.Edit.Blueprints
|
|||||||
Vector2 startPosition = CatchHitObjectUtils.GetStartPosition(HitObjectContainer, HitObject);
|
Vector2 startPosition = CatchHitObjectUtils.GetStartPosition(HitObjectContainer, HitObject);
|
||||||
editablePath.Position = nestedOutlineContainer.Position = scrollingPath.Position = startPosition;
|
editablePath.Position = nestedOutlineContainer.Position = scrollingPath.Position = startPosition;
|
||||||
|
|
||||||
updateHitObjectFromPath();
|
if (lastEditablePathId != editablePath.PathId)
|
||||||
}
|
|
||||||
|
|
||||||
private void updateHitObjectFromPath()
|
|
||||||
{
|
|
||||||
if (lastEditablePathId == editablePath.PathId)
|
|
||||||
return;
|
|
||||||
|
|
||||||
editablePath.UpdateHitObjectFromPath(HitObject);
|
editablePath.UpdateHitObjectFromPath(HitObject);
|
||||||
ApplyDefaultsToHitObject();
|
lastEditablePathId = editablePath.PathId;
|
||||||
|
|
||||||
|
ApplyDefaultsToHitObject();
|
||||||
scrollingPath.UpdatePathFrom(HitObjectContainer, HitObject);
|
scrollingPath.UpdatePathFrom(HitObjectContainer, HitObject);
|
||||||
nestedOutlineContainer.UpdateNestedObjectsFrom(HitObjectContainer, HitObject);
|
nestedOutlineContainer.UpdateNestedObjectsFrom(HitObjectContainer, HitObject);
|
||||||
|
|
||||||
lastEditablePathId = editablePath.PathId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private double positionToTime(float relativeYPosition)
|
private double positionToTime(float relativeYPosition)
|
||||||
|
Loading…
Reference in New Issue
Block a user