Move source clock adjustment application to Start()

This commit is contained in:
smoogipoo 2021-04-20 13:09:49 +09:00
parent a92ae8ce76
commit 8dd9134e3d

View File

@ -105,6 +105,12 @@ namespace osu.Game.Screens.Play
this.TransformBindableTo(pauseFreqAdjust, 1, 200, Easing.In);
}
public override void Start()
{
addSourceClockAdjustments();
base.Start();
}
/// <summary>
/// Seek to a specific time in gameplay.
/// </summary>
@ -122,12 +128,6 @@ namespace osu.Game.Screens.Play
userOffsetClock.ProcessFrame();
}
public override void Reset()
{
updateRate();
base.Reset();
}
/// <summary>
/// Skip forward to the next valid skip point.
/// </summary>
@ -164,11 +164,12 @@ namespace osu.Game.Screens.Play
{
removeSourceClockAdjustments();
ChangeSource(new TrackVirtual(beatmap.Track.Length));
addSourceClockAdjustments();
}
private bool speedAdjustmentsApplied;
private void updateRate()
private void addSourceClockAdjustments()
{
if (speedAdjustmentsApplied)
return;