diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/SliderTailPiece.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/SliderTailPiece.cs index e60e41f6d5..5cf9346f2e 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/SliderTailPiece.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/SliderTailPiece.cs @@ -65,7 +65,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components { Color4 colour = colours.Yellow; - if (IsHovered && Slider.RepeatCount % 2 == 0) + if (IsHovered) colour = colour.Lighten(1); CirclePiece.Colour = colour; @@ -73,8 +73,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components protected override bool OnDragStart(DragStartEvent e) { - // Disable dragging if the slider has an uneven number of repeats because the slider tail will be on the wrong side of the path. - if (e.Button == MouseButton.Right || !inputManager.CurrentState.Keyboard.ShiftPressed || Slider.RepeatCount % 2 == 1) + if (e.Button == MouseButton.Right || !inputManager.CurrentState.Keyboard.ShiftPressed) return false; isDragging = true; diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleOverlay.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleOverlay.cs index b00a42748e..2bf5118039 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleOverlay.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/SliderCircleOverlay.cs @@ -32,7 +32,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders { base.Update(); - var circle = position == SliderPosition.Start ? (HitCircle)Slider.HeadCircle : Slider.TailCircle; + var circle = position == SliderPosition.Start ? (HitCircle)Slider.HeadCircle : + Slider.RepeatCount % 2 == 0 ? Slider.TailCircle : Slider.LastRepeat; CirclePiece.UpdateFrom(circle); marker.UpdateFrom(circle); diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs index 506145568e..7a22bf5c4d 100644 --- a/osu.Game.Rulesets.Osu/Objects/Slider.cs +++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs @@ -162,6 +162,9 @@ namespace osu.Game.Rulesets.Osu.Objects [JsonIgnore] public SliderTailCircle TailCircle { get; protected set; } + [JsonIgnore] + public SliderRepeat LastRepeat { get; protected set; } + public Slider() { SamplesBindable.CollectionChanged += (_, _) => UpdateNestedSamples(); @@ -225,7 +228,7 @@ namespace osu.Game.Rulesets.Osu.Objects break; case SliderEventType.Repeat: - AddNested(new SliderRepeat(this) + AddNested(LastRepeat = new SliderRepeat(this) { RepeatIndex = e.SpanIndex, StartTime = StartTime + (e.SpanIndex + 1) * SpanDuration, @@ -248,6 +251,9 @@ namespace osu.Game.Rulesets.Osu.Objects if (TailCircle != null) TailCircle.Position = EndPosition; + + if (LastRepeat != null) + LastRepeat.Position = RepeatCount % 2 == 0 ? Position : Position + Path.PositionAt(1); } protected void UpdateNestedSamples()