1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Revert "Fix spectator not starting from correct seek point (hotfix)"

This reverts commit 2b59eff465.
This commit is contained in:
Dean Herbert 2022-03-19 17:20:54 +09:00
parent 2b59eff465
commit cf2212e794

View File

@ -78,12 +78,17 @@ namespace osu.Game.Screens.Play
firstHitObjectTime = beatmap.Beatmap.HitObjects.First().StartTime;
}
[BackgroundDependencyLoader]
private void load()
protected override void LoadComplete()
{
// TODO: This code should not be in the BDL load method, but is to avoid seeks being overwritten.
// See https://github.com/ppy/osu/issues/17267 for the issue.
// See https://github.com/ppy/osu/pull/17302 for a better fix which needs some more time.
base.LoadComplete();
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
userAudioOffset.BindValueChanged(offset => userGlobalOffsetClock.Offset = offset.NewValue, true);
beatmapOffsetSubscription = realm.SubscribeToPropertyChanged(
r => r.Find<BeatmapInfo>(beatmap.BeatmapInfo.ID)?.UserSettings,
settings => settings.Offset,
val => userBeatmapOffsetClock.Offset = val);
// sane default provided by ruleset.
startOffset = gameplayStartTime;
@ -107,19 +112,6 @@ namespace osu.Game.Screens.Play
Seek(startOffset);
}
protected override void LoadComplete()
{
base.LoadComplete();
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
userAudioOffset.BindValueChanged(offset => userGlobalOffsetClock.Offset = offset.NewValue, true);
beatmapOffsetSubscription = realm.SubscribeToPropertyChanged(
r => r.Find<BeatmapInfo>(beatmap.BeatmapInfo.ID)?.UserSettings,
settings => settings.Offset,
val => userBeatmapOffsetClock.Offset = val);
}
protected override void OnIsPausedChanged(ValueChangedEvent<bool> isPaused)
{
// The source is stopped by a frequency fade first.