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

Merge pull request #10659 from smoogipoo/fix-editor-seek-transform

Fix editor seek transform seeking too much
This commit is contained in:
Dean Herbert 2020-11-02 21:52:14 +09:00 committed by GitHub
commit 3765c8abb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}