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>
|
/// </summary>
|
||||||
protected readonly DecoupleableInterpolatingFramedClock AdjustableSource;
|
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>
|
/// <summary>
|
||||||
/// The source clock.
|
/// The source clock.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -105,7 +100,7 @@ namespace osu.Game.Screens.Play
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual void Reset()
|
public virtual void Reset()
|
||||||
{
|
{
|
||||||
Seek(StartOffset);
|
Seek(0);
|
||||||
|
|
||||||
// Manually stop the source in order to not affect the IsPaused state.
|
// Manually stop the source in order to not affect the IsPaused state.
|
||||||
AdjustableSource.Stop();
|
AdjustableSource.Stop();
|
||||||
|
@ -47,9 +47,6 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
|
private readonly BindableDouble pauseFreqAdjust = new BindableDouble(1);
|
||||||
|
|
||||||
protected override double StartOffset => startOffset;
|
|
||||||
private double startOffset;
|
|
||||||
|
|
||||||
private readonly WorkingBeatmap beatmap;
|
private readonly WorkingBeatmap beatmap;
|
||||||
private readonly double gameplayStartTime;
|
private readonly double gameplayStartTime;
|
||||||
private readonly bool startAtGameplayStart;
|
private readonly bool startAtGameplayStart;
|
||||||
@ -59,6 +56,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private FramedOffsetClock platformOffsetClock;
|
private FramedOffsetClock platformOffsetClock;
|
||||||
private LocalGameplayClock localGameplayClock;
|
private LocalGameplayClock localGameplayClock;
|
||||||
private Bindable<double> userAudioOffset;
|
private Bindable<double> userAudioOffset;
|
||||||
|
private double startOffset;
|
||||||
|
|
||||||
public MasterGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStartTime, bool startAtGameplayStart = false)
|
public MasterGameplayClockContainer(WorkingBeatmap beatmap, double gameplayStartTime, bool startAtGameplayStart = false)
|
||||||
: base(beatmap.Track)
|
: base(beatmap.Track)
|
||||||
@ -94,6 +92,8 @@ namespace osu.Game.Screens.Play
|
|||||||
if (beatmap.BeatmapInfo.AudioLeadIn > 0)
|
if (beatmap.BeatmapInfo.AudioLeadIn > 0)
|
||||||
startOffset = Math.Min(startOffset, firstHitObjectTime - beatmap.BeatmapInfo.AudioLeadIn);
|
startOffset = Math.Min(startOffset, firstHitObjectTime - beatmap.BeatmapInfo.AudioLeadIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Seek(startOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnIsPausedChanged(ValueChangedEvent<bool> isPaused)
|
protected override void OnIsPausedChanged(ValueChangedEvent<bool> isPaused)
|
||||||
@ -142,6 +142,12 @@ namespace osu.Game.Screens.Play
|
|||||||
Seek(skipTarget);
|
Seek(skipTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void Reset()
|
||||||
|
{
|
||||||
|
base.Reset();
|
||||||
|
Seek(startOffset);
|
||||||
|
}
|
||||||
|
|
||||||
protected override GameplayClock CreateGameplayClock(IFrameBasedClock source)
|
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.
|
// 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