mirror of
https://github.com/ppy/osu.git
synced 2026-06-02 06:09:55 +08:00
Calculate multiplayer room difficulty range based only on non-expired items
Previously (https://github.com/ppy/osu/pull/34464) this was based on room status, but in review of the web-side change it was pointed out that even an open room could have no active items (https://github.com/ppy/osu-web/pull/12325#pullrequestreview-3082894354).
This commit is contained in:
@@ -116,10 +116,10 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
else
|
||||
{
|
||||
// When Playlist is not empty (in room) we compute actual range
|
||||
IEnumerable<PlaylistItem> difficultyRangeSource = room.Playlist;
|
||||
IReadOnlyList<PlaylistItem> difficultyRangeSource = room.Playlist.Where(item => !item.Expired).ToList();
|
||||
|
||||
if (!room.HasEnded)
|
||||
difficultyRangeSource = difficultyRangeSource.Where(playlistItem => !playlistItem.Expired);
|
||||
if (difficultyRangeSource.Count == 0)
|
||||
difficultyRangeSource = room.Playlist;
|
||||
|
||||
var orderedDifficulties = difficultyRangeSource.Select(item => item.Beatmap)
|
||||
.OrderBy(b => b.StarRating)
|
||||
|
||||
Reference in New Issue
Block a user