1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 16:07:25 +08:00

Remove unnecessary checks

This commit is contained in:
iiSaLMaN 2019-07-26 03:11:59 +03:00
parent 1d6c321e14
commit a08d54eb06

View File

@ -136,16 +136,11 @@ namespace osu.Game.Screens.Play
return;
}
if (Clock.CurrentTime > breaks[nearestBreakIndex].EndTime)
{
while (nearestBreakIndex < breaks.Count - 1 && Clock.CurrentTime > breaks[nearestBreakIndex].EndTime)
nearestBreakIndex++;
}
else
{
while (nearestBreakIndex > 0 && Clock.CurrentTime < breaks[nearestBreakIndex].StartTime)
nearestBreakIndex--;
}
// This ensures that IsBreakTime is generally consistent with the overlay's transforms during a break.
// If the overlay never shows (break.HasEffect is false), IsBreakTime should be false.