1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 17:52:56 +08:00

Permit nulls rather than casting to OsuGame

This commit is contained in:
Shane Woolcock 2020-10-07 16:16:58 +10:30
parent d1ec380692
commit 8b8eb00bd7

View File

@ -157,8 +157,8 @@ namespace osu.Game.Screens.Play
DrawableRuleset.SetRecordTarget(recordingReplay = new Replay());
}
[BackgroundDependencyLoader]
private void load(AudioManager audio, OsuConfigManager config, OsuGameBase game)
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, OsuConfigManager config, OsuGame game)
{
Mods.Value = base.Mods.Value.Select(m => m.CreateCopy()).ToArray();
@ -174,8 +174,8 @@ namespace osu.Game.Screens.Play
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
if (game is OsuGame osuGame)
localUserPlaying.BindTo(osuGame.LocalUserPlaying);
if (game != null)
localUserPlaying.BindTo(game.LocalUserPlaying);
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);