1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:47:51 +08:00

Add a quick check if we're not in a break with current index

This commit is contained in:
iiSaLMaN 2019-07-26 09:17:39 +03:00
parent 6fac716ec7
commit 5a94a22314

View File

@ -146,6 +146,16 @@ namespace osu.Game.Screens.Play
var time = Clock.CurrentTime;
if (currentBreakIndex < breaks.Count - 1)
{
// Quick check if we're not in a break with our current index.
if (time > breaks[currentBreakIndex].EndTime && time < breaks[currentBreakIndex + 1].StartTime)
{
isBreakTime.Value = false;
return;
}
}
if (time > breaks[currentBreakIndex].EndTime)
{
for (int i = currentBreakIndex; i < breaks.Count; i++)