Skip to content

Commit 2133ac6

Browse files
authored
Merge pull request #31453 from bdach/fix-juice-stream-placement-offset
Fix juice stream placement blueprint being initially visually offset
2 parents 074b743 + 18f1d62 commit 2133ac6

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

osu.Game.Rulesets.Catch/Edit/Blueprints/JuiceStreamPlacementBlueprint.cs

+5-14
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ public override void UpdateTimeAndPosition(SnapResult result)
8888
switch (PlacementActive)
8989
{
9090
case PlacementState.Waiting:
91-
if (!(result.Time is double snappedTime)) return;
92-
9391
HitObject.OriginalX = ToLocalSpace(result.ScreenSpacePosition).X;
94-
HitObject.StartTime = snappedTime;
92+
if (result.Time is double snappedTime)
93+
HitObject.StartTime = snappedTime;
9594
break;
9695

9796
case PlacementState.Active:
@@ -107,21 +106,13 @@ public override void UpdateTimeAndPosition(SnapResult result)
107106
Vector2 startPosition = CatchHitObjectUtils.GetStartPosition(HitObjectContainer, HitObject);
108107
editablePath.Position = nestedOutlineContainer.Position = scrollingPath.Position = startPosition;
109108

110-
updateHitObjectFromPath();
111-
}
112-
113-
private void updateHitObjectFromPath()
114-
{
115-
if (lastEditablePathId == editablePath.PathId)
116-
return;
109+
if (lastEditablePathId != editablePath.PathId)
110+
editablePath.UpdateHitObjectFromPath(HitObject);
111+
lastEditablePathId = editablePath.PathId;
117112

118-
editablePath.UpdateHitObjectFromPath(HitObject);
119113
ApplyDefaultsToHitObject();
120-
121114
scrollingPath.UpdatePathFrom(HitObjectContainer, HitObject);
122115
nestedOutlineContainer.UpdateNestedObjectsFrom(HitObjectContainer, HitObject);
123-
124-
lastEditablePathId = editablePath.PathId;
125116
}
126117

127118
private double positionToTime(float relativeYPosition)

0 commit comments

Comments
 (0)