mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Remove initial selection from OnlinePlaySongSelect
This stuff never really worked anyway - every case except with an already created multiplayer room was broken anyway.
This commit is contained in:
parent
208bd0f391
commit
fcea244537
@ -49,11 +49,6 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
private readonly PlaylistItem? initialItem;
|
||||
private readonly FreeModSelectOverlay freeModSelectOverlay;
|
||||
|
||||
private WorkingBeatmap initialBeatmap = null!;
|
||||
private RulesetInfo initialRuleset = null!;
|
||||
private IReadOnlyList<Mod> initialMods = null!;
|
||||
private bool itemSelected;
|
||||
|
||||
private IDisposable? freeModSelectOverlayRegistration;
|
||||
|
||||
/// <summary>
|
||||
@ -80,12 +75,6 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
private void load()
|
||||
{
|
||||
LeftArea.Padding = new MarginPadding { Top = Header.HEIGHT };
|
||||
|
||||
// Store the initial beatmap/ruleset/mods at the point of entering song select, so they can be reverted to upon exit.
|
||||
initialBeatmap = Beatmap.Value;
|
||||
initialRuleset = Ruleset.Value;
|
||||
initialMods = Mods.Value.ToList();
|
||||
|
||||
LoadComponent(freeModSelectOverlay);
|
||||
}
|
||||
|
||||
@ -152,13 +141,7 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
AllowedMods = FreeMods.Value.Select(m => new APIMod(m)).ToArray()
|
||||
};
|
||||
|
||||
if (SelectItem(item))
|
||||
{
|
||||
itemSelected = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return SelectItem(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -181,15 +164,7 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
public override bool OnExiting(ScreenExitEvent e)
|
||||
{
|
||||
if (!itemSelected)
|
||||
{
|
||||
Beatmap.Value = initialBeatmap;
|
||||
Ruleset.Value = initialRuleset;
|
||||
Mods.Value = initialMods;
|
||||
}
|
||||
|
||||
freeModSelectOverlay.Hide();
|
||||
|
||||
return base.OnExiting(e);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user