mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Merge pull request #10659 from smoogipoo/fix-editor-seek-transform
Fix editor seek transform seeking too much
This commit is contained in:
commit
3765c8abb9
@ -266,8 +266,15 @@ namespace osu.Game.Screens.Edit
|
|||||||
{
|
{
|
||||||
public override string TargetMember => nameof(currentTime);
|
public override string TargetMember => nameof(currentTime);
|
||||||
|
|
||||||
protected override void Apply(EditorClock clock, double time) =>
|
protected override void Apply(EditorClock clock, double time) => clock.currentTime = valueAt(time);
|
||||||
clock.currentTime = Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
|
|
||||||
|
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;
|
protected override void ReadIntoStartValue(EditorClock clock) => StartValue = clock.currentTime;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user