1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Call break time update when loaded

This commit is contained in:
Salman Ahmed 2021-02-06 20:54:13 +03:00
parent f29938e15d
commit c9db0bf886

View File

@ -32,6 +32,7 @@ namespace osu.Game.Screens.Play
breaks = new PeriodTracker(value.Where(b => b.HasEffect) breaks = new PeriodTracker(value.Where(b => b.HasEffect)
.Select(b => new Period(b.StartTime, b.EndTime - BreakOverlay.BREAK_FADE_DURATION))); .Select(b => new Period(b.StartTime, b.EndTime - BreakOverlay.BREAK_FADE_DURATION)));
if (IsLoaded)
updateBreakTime(); updateBreakTime();
} }
} }
@ -50,7 +51,7 @@ namespace osu.Game.Screens.Play
private void updateBreakTime() private void updateBreakTime()
{ {
var time = Clock?.CurrentTime ?? 0; var time = Clock.CurrentTime;
isBreakTime.Value = breaks?.IsInAny(time) == true isBreakTime.Value = breaks?.IsInAny(time) == true
|| time < gameplayStartTime || time < gameplayStartTime