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:
parent
6fac716ec7
commit
5a94a22314
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user