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

Fix looping failure

This commit is contained in:
Dean Herbert 2018-12-26 22:37:09 +09:00
parent 6b7b0af2e4
commit cc1f3d54b0

View File

@ -134,9 +134,18 @@ namespace osu.Game.Screens.Multi
Content.ScaleTo(1.1f, 250, Easing.InSine);
Content.FadeOut(250);
cancelLooping();
base.OnSuspending(next);
}
private void cancelLooping()
{
var track = Beatmap.Value.Track;
if (track != null)
track.Looping = false;
}
protected override void LogoExiting(OsuLogo logo)
{
// the wave overlay transition takes longer than expected to run.
@ -148,6 +157,8 @@ namespace osu.Game.Screens.Multi
{
base.Update();
if (!IsCurrentScreen) return;
if (currentScreen is MatchSubScreen)
{
var track = Beatmap.Value.Track;
@ -180,11 +191,7 @@ namespace osu.Game.Screens.Multi
private void screenRemoved(Screen newScreen)
{
if (currentScreen is MatchSubScreen)
{
var track = Beatmap.Value.Track;
if (track != null)
track.Looping = false;
}
cancelLooping();
currentScreen = (OsuScreen)newScreen;
}