mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Permit nulls rather than casting to OsuGame
This commit is contained in:
@ -157,8 +157,8 @@ namespace osu.Game.Screens.Play
|
|||||||
DrawableRuleset.SetRecordTarget(recordingReplay = new Replay());
|
DrawableRuleset.SetRecordTarget(recordingReplay = new Replay());
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(AudioManager audio, OsuConfigManager config, OsuGameBase game)
|
private void load(AudioManager audio, OsuConfigManager config, OsuGame game)
|
||||||
{
|
{
|
||||||
Mods.Value = base.Mods.Value.Select(m => m.CreateCopy()).ToArray();
|
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);
|
mouseWheelDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableWheel);
|
||||||
|
|
||||||
if (game is OsuGame osuGame)
|
if (game != null)
|
||||||
localUserPlaying.BindTo(osuGame.LocalUserPlaying);
|
localUserPlaying.BindTo(game.LocalUserPlaying);
|
||||||
|
|
||||||
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);
|
DrawableRuleset = ruleset.CreateDrawableRulesetWith(playableBeatmap, Mods.Value);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user