mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 14:22:55 +08:00
Fix spectator not starting from correct seek point (hotfix)
This commit is contained in:
parent
63998ad9f1
commit
2b59eff465
@ -78,17 +78,12 @@ namespace osu.Game.Screens.Play
|
|||||||
firstHitObjectTime = beatmap.Beatmap.HitObjects.First().StartTime;
|
firstHitObjectTime = beatmap.Beatmap.HitObjects.First().StartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
{
|
{
|
||||||
base.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.
|
||||||
userAudioOffset = config.GetBindable<double>(OsuSetting.AudioOffset);
|
// See https://github.com/ppy/osu/pull/17302 for a better fix which needs some more time.
|
||||||
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.
|
// sane default provided by ruleset.
|
||||||
startOffset = gameplayStartTime;
|
startOffset = gameplayStartTime;
|
||||||
@ -112,6 +107,19 @@ namespace osu.Game.Screens.Play
|
|||||||
Seek(startOffset);
|
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)
|
protected override void OnIsPausedChanged(ValueChangedEvent<bool> isPaused)
|
||||||
{
|
{
|
||||||
// The source is stopped by a frequency fade first.
|
// The source is stopped by a frequency fade first.
|
||||||
|
Loading…
Reference in New Issue
Block a user