From b9e4c920c54b99d7323a560f25b680066b5ed492 Mon Sep 17 00:00:00 2001 From: Jorolf Date: Fri, 3 Mar 2017 21:11:38 +0100 Subject: [PATCH 1/2] SelectRandom doesnt select hidden groups now --- osu.Game/Screens/Select/CarouselContainer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Screens/Select/CarouselContainer.cs b/osu.Game/Screens/Select/CarouselContainer.cs index 5d8c11d223..f63c31f980 100644 --- a/osu.Game/Screens/Select/CarouselContainer.cs +++ b/osu.Game/Screens/Select/CarouselContainer.cs @@ -376,6 +376,7 @@ namespace osu.Game.Screens.Select public void SelectRandom() { + List groups = this.groups.Where( (BeatmapGroup selectGroup) => selectGroup.State != BeatmapGroupState.Hidden).ToList(); if (groups.Count < 1) return; BeatmapGroup group = groups[RNG.Next(groups.Count)]; From 5c5066e1ae5327d9a5af10abac3f405cd5141b8b Mon Sep 17 00:00:00 2001 From: Jorolf Date: Sat, 4 Mar 2017 15:30:14 +0100 Subject: [PATCH 2/2] renamed local groups --- osu.Game/Screens/Select/CarouselContainer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Select/CarouselContainer.cs b/osu.Game/Screens/Select/CarouselContainer.cs index f63c31f980..1930ab2daf 100644 --- a/osu.Game/Screens/Select/CarouselContainer.cs +++ b/osu.Game/Screens/Select/CarouselContainer.cs @@ -376,10 +376,10 @@ namespace osu.Game.Screens.Select public void SelectRandom() { - List groups = this.groups.Where( (BeatmapGroup selectGroup) => selectGroup.State != BeatmapGroupState.Hidden).ToList(); - if (groups.Count < 1) + List visibleGroups = this.groups.Where((BeatmapGroup selectGroup) => selectGroup.State != BeatmapGroupState.Hidden).ToList(); + if (visibleGroups.Count < 1) return; - BeatmapGroup group = groups[RNG.Next(groups.Count)]; + BeatmapGroup group = visibleGroups[RNG.Next(visibleGroups.Count)]; BeatmapPanel panel = group?.BeatmapPanels.First(); if (panel == null) return;