mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 00:33:21 +08:00
Merge pull request #7372 from peppy/fix-replay-import
Fix replay import from main menu causing a hard crash
This commit is contained in:
commit
6c5e25a13a
@ -118,8 +118,6 @@ namespace osu.Game.Screens.Play
|
||||
},
|
||||
idleTracker = new IdleTracker(750)
|
||||
});
|
||||
|
||||
loadNewPlayer();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -127,6 +125,21 @@ namespace osu.Game.Screens.Play
|
||||
base.LoadComplete();
|
||||
|
||||
inputManager = GetContainingInputManager();
|
||||
}
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
loadNewPlayer();
|
||||
|
||||
content.ScaleTo(0.7f);
|
||||
Background?.FadeColour(Color4.White, 800, Easing.OutQuint);
|
||||
|
||||
contentIn();
|
||||
|
||||
info.Delay(750).FadeIn(500);
|
||||
this.Delay(1800).Schedule(pushWhenLoaded);
|
||||
|
||||
if (!muteWarningShownOnce.Value)
|
||||
{
|
||||
@ -179,19 +192,6 @@ namespace osu.Game.Screens.Play
|
||||
content.FadeOut(250);
|
||||
}
|
||||
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
base.OnEntering(last);
|
||||
|
||||
content.ScaleTo(0.7f);
|
||||
Background?.FadeColour(Color4.White, 800, Easing.OutQuint);
|
||||
|
||||
contentIn();
|
||||
|
||||
info.Delay(750).FadeIn(500);
|
||||
this.Delay(1800).Schedule(pushWhenLoaded);
|
||||
}
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
{
|
||||
base.LogoArriving(logo, resuming);
|
||||
|
@ -2,7 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
@ -20,15 +20,13 @@ namespace osu.Game.Screens.Play
|
||||
scoreInfo = score.ScoreInfo;
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
public override void OnEntering(IScreen last)
|
||||
{
|
||||
var dependencies = base.CreateChildDependencies(parent);
|
||||
|
||||
// these will be reverted thanks to PlayerLoader's lease.
|
||||
Mods.Value = scoreInfo.Mods;
|
||||
Ruleset.Value = scoreInfo.Ruleset;
|
||||
|
||||
return dependencies;
|
||||
base.OnEntering(last);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user