diff --git a/README.md b/README.md index 3306c9ab25..ad56178132 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# osu! [![Build status](https://ci.appveyor.com/api/projects/status/u2p01nx7l6og8buh?svg=true)](https://ci.appveyor.com/project/peppy/osu) [![CodeFactor](https://www.codefactor.io/repository/github/ppy/osu/badge)](https://www.codefactor.io/repository/github/ppy/osu) +# osu! [![Build status](https://ci.appveyor.com/api/projects/status/u2p01nx7l6og8buh?svg=true)](https://ci.appveyor.com/project/peppy/osu) [![CodeFactor](https://www.codefactor.io/repository/github/ppy/osu/badge)](https://www.codefactor.io/repository/github/ppy/osu) [![dev chat](https://discordapp.com/api/guilds/188630481301012481/widget.png?style=shield)](https://discord.gg/ppy) -[osu! on the web](https://osu.ppy.sh) | [dev chat](https://discord.gg/ppy) - -Rhythm is just a *click* away. The future of osu! and the beginning of an open era! +Rhythm is just a *click* away. The future of [osu!](https://osu.ppy.sh) and the beginning of an open era! # Status diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index dc4ec92ee2..a23efcd9d4 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -22,6 +22,8 @@ using osu.Game.Screens.Tournament; using osu.Framework.Input; using OpenTK.Input; using System.Threading.Tasks; +using System.Collections.Generic; +using System.Linq; namespace osu.Game.Screens.Menu { @@ -74,10 +76,10 @@ namespace osu.Game.Screens.Menu if (!menuMusic) { trackManager = game.Audio.Track; - int choosableBeatmapsetAmmount = beatmaps.Query().Count(); - if (choosableBeatmapsetAmmount > 0) + List choosableBeatmapSets = beatmaps.Query().ToList(); + if (choosableBeatmapSets.Count > 0) { - song = beatmaps.GetWorkingBeatmap(beatmaps.GetWithChildren(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0]); + song = beatmaps.GetWorkingBeatmap(beatmaps.GetWithChildren(choosableBeatmapSets[RNG.Next(0, choosableBeatmapSets.Count - 1)].ID).Beatmaps[0]); Beatmap = song; } }