1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 21:27:24 +08:00

Fix editor seek transform seeking too much

This commit is contained in:
smoogipoo 2020-11-02 21:08:58 +09:00
parent 1ab609fa2f
commit 3956a0669a

View File

@ -266,8 +266,15 @@ namespace osu.Game.Screens.Edit
{
public override string TargetMember => nameof(currentTime);
protected override void Apply(EditorClock clock, double time) =>
clock.currentTime = Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
protected override void Apply(EditorClock clock, double time) => clock.currentTime = valueAt(time);
private double valueAt(double time)
{
if (time < StartTime) return StartValue;
if (time >= EndTime) return EndValue;
return Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
}
protected override void ReadIntoStartValue(EditorClock clock) => StartValue = clock.currentTime;
}