1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Merge pull request #431 from Jorolf/moarOptions

SelectRandom doesnt select hidden groups now
This commit is contained in:
Dean Herbert 2017-03-05 01:28:14 +09:00 committed by GitHub
commit 7db319d384

View File

@ -356,10 +356,10 @@ namespace osu.Game.Screens.Select
public void SelectRandom() public void SelectRandom()
{ {
if (groups.Count < 1) List<BeatmapGroup> visibleGroups = this.groups.Where((BeatmapGroup selectGroup) => selectGroup.State != BeatmapGroupState.Hidden).ToList();
if (visibleGroups.Count < 1)
return; return;
BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)];
BeatmapGroup group = groups[RNG.Next(groups.Count)];
BeatmapPanel panel = group?.BeatmapPanels.First(); BeatmapPanel panel = group?.BeatmapPanels.First();
if (panel == null) if (panel == null)