mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Restore ruleset using current playlist item on resuming room sub screen
Ensures that the ruleset selected at the multiplayer song selection screen does not overwrite the current playlist item's ruleset.
This commit is contained in:
parent
446962446e
commit
c5ac996e3f
@ -300,6 +300,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
updateWorkingBeatmap();
|
||||
beginHandlingTrack();
|
||||
Scheduler.AddOnce(UpdateMods);
|
||||
Scheduler.AddOnce(updateRuleset);
|
||||
}
|
||||
|
||||
public override bool OnExiting(IScreen next)
|
||||
@ -353,8 +354,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
.ToList();
|
||||
|
||||
UpdateMods();
|
||||
|
||||
Ruleset.Value = rulesets.GetRuleset(selected.RulesetID);
|
||||
updateRuleset();
|
||||
|
||||
if (!selected.AllowedMods.Any())
|
||||
{
|
||||
@ -387,6 +387,14 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
Mods.Value = UserMods.Value.Concat(SelectedItem.Value.RequiredMods).ToList();
|
||||
}
|
||||
|
||||
private void updateRuleset()
|
||||
{
|
||||
if (SelectedItem.Value == null || !this.IsCurrentScreen())
|
||||
return;
|
||||
|
||||
Ruleset.Value = rulesets.GetRuleset(SelectedItem.Value.RulesetID);
|
||||
}
|
||||
|
||||
private void beginHandlingTrack()
|
||||
{
|
||||
Beatmap.BindValueChanged(applyLoopingToTrack, true);
|
||||
|
Loading…
Reference in New Issue
Block a user