mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Move seekOffset back to MasterGameplayClockContainer
This commit is contained in:
parent
a683e5ec34
commit
ec080fcb32
@ -29,11 +29,6 @@ namespace osu.Game.Screens.Play
|
||||
/// </summary>
|
||||
protected readonly DecoupleableInterpolatingFramedClock AdjustableSource;
|
||||
|
||||
/// <summary>
|
||||
/// The offset at which to start playing. Affects the time which the clock is reset to via <see cref="Reset"/>.
|
||||
/// </summary>
|
||||
protected virtual double StartOffset => 0;
|
||||
|
||||
/// <summary>
|
||||
/// The source clock.
|
||||
/// </summary>
|
||||
@ -105,7 +100,7 @@ namespace osu.Game.Screens.Play
|
||||
/// </summary>
|
||||
public virtual void Reset()
|
||||
{
|
||||
Seek(StartOffset);
|
||||
Seek(0);
|
||||
|
||||
// Manually stop the source in order to not affect the IsPaused state.
|
||||
AdjustableSource.Stop();
|
||||
|
@ -47,9 +47,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
|
||||
|
||||
protected override double StartOffset => startOffset;
|
||||
private double startOffset;
|
||||
|
||||
private readonly WorkingBeatmap beatmap;
|
||||
private readonly double gameplayStartTime;
|
||||
private readonly bool startAtGameplayStart;
|
||||
@ -59,6 +56,7 @@ namespace osu.Game.Screens.Play
|
||||
private FramedOffsetClock platformOffsetClock;
|
||||
private LocalGameplayClock localGameplayClock;
|
||||
private Bindable<double> userAudioOffset;
|
||||
private double startOffset;
|
||||
|
||||
public MasterGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStartTime, bool startAtGameplayStart = false)
|
||||
: base(beatmap.Track)
|
||||
@ -94,6 +92,8 @@ namespace osu.Game.Screens.Play
|
||||
if (beatmap.BeatmapInfo.AudioLeadIn > 0)
|
||||
startOffset = Math.Min(startOffset, firstHitObjectTime - beatmap.BeatmapInfo.AudioLeadIn);
|
||||
}
|
||||
|
||||
Seek(startOffset);
|
||||
}
|
||||
|
||||
protected override void OnIsPausedChanged(ValueChangedEvent<bool> isPaused)
|
||||
@ -142,6 +142,12 @@ namespace osu.Game.Screens.Play
|
||||
Seek(skipTarget);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
{
|
||||
base.Reset();
|
||||
Seek(startOffset);
|
||||
}
|
||||
|
||||
protected override GameplayClock CreateGameplayClock(IFrameBasedClock source)
|
||||
{
|
||||
// Lazer's audio timings in general doesn't match stable. This is the result of user testing, albeit limited.
|
||||
|
Loading…
x
Reference in New Issue
Block a user