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