mirror of
https://github.com/ppy/osu
synced 2025-03-25 04:18:03 +00:00
Ensure mods are set prior to starting play
This commit is contained in:
parent
c818e1cd83
commit
101fdf993e
@ -2,7 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -12,7 +11,6 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Multiplayer.GameTypes;
|
using osu.Game.Online.Multiplayer.GameTypes;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Mods;
|
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Screens.Multi.Play;
|
using osu.Game.Screens.Multi.Play;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
@ -136,7 +134,6 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
bindings.CurrentBeatmap.BindValueChanged(setBeatmap, true);
|
bindings.CurrentBeatmap.BindValueChanged(setBeatmap, true);
|
||||||
bindings.CurrentMods.BindValueChanged(setMods, true);
|
|
||||||
bindings.CurrentRuleset.BindValueChanged(setRuleset, true);
|
bindings.CurrentRuleset.BindValueChanged(setRuleset, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,11 +145,6 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
game?.ForcefullySetBeatmap(beatmapManager.GetWorkingBeatmap(localBeatmap));
|
game?.ForcefullySetBeatmap(beatmapManager.GetWorkingBeatmap(localBeatmap));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setMods(IEnumerable<Mod> mods)
|
|
||||||
{
|
|
||||||
Beatmap.Value.Mods.Value = mods.ToArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setRuleset(RulesetInfo ruleset)
|
private void setRuleset(RulesetInfo ruleset)
|
||||||
{
|
{
|
||||||
if (ruleset == null)
|
if (ruleset == null)
|
||||||
@ -184,6 +176,8 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
|
|
||||||
private void onStart()
|
private void onStart()
|
||||||
{
|
{
|
||||||
|
Beatmap.Value.Mods.Value = bindings.CurrentMods.Value.ToArray();
|
||||||
|
|
||||||
switch (bindings.Type.Value)
|
switch (bindings.Type.Value)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user