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