1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 06:20:02 +08:00

Permit nulls rather than casting to OsuGame

This commit is contained in:
Shane Woolcock
2020-10-07 16:16:58 +10:30
Unverified
parent d1ec380692
commit 8b8eb00bd7
+4 -4
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);