mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 12:13:20 +08:00
Fix incorrect snaking on non-repeat sliders.
This commit is contained in:
parent
d05a1ea1c5
commit
29d15c3ab8
@ -93,26 +93,24 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
|
||||
private void updateBody(int repeat, double progress)
|
||||
{
|
||||
double drawStartProgress = 0;
|
||||
double drawEndProgress = MathHelper.Clamp((Time.Current - slider.StartTime + TIME_PREEMPT) / TIME_FADEIN, 0, 1);
|
||||
double start = 0;
|
||||
double end = snakingIn ? MathHelper.Clamp((Time.Current - (slider.StartTime - TIME_PREEMPT)) / TIME_FADEIN, 0, 1) : 1;
|
||||
|
||||
if (repeat >= slider.RepeatCount - 1)
|
||||
{
|
||||
if (Math.Min(repeat, slider.RepeatCount - 1) % 2 == 1)
|
||||
{
|
||||
drawStartProgress = 0;
|
||||
drawEndProgress = progress;
|
||||
start = 0;
|
||||
end = snakingOut ? progress : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawStartProgress = progress;
|
||||
drawEndProgress = 1;
|
||||
start = snakingOut ? progress : 0;
|
||||
end = 1;
|
||||
}
|
||||
}
|
||||
|
||||
body.SetRange(
|
||||
snakingOut ? drawStartProgress : 0,
|
||||
snakingIn ? drawEndProgress : 1);
|
||||
body.SetRange(start, end);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
Loading…
Reference in New Issue
Block a user