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:
parent
6b7b0af2e4
commit
cc1f3d54b0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user