From aa88d90eb2ba9c9db27cdac939d256e8fb45a4b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 13 Aug 2025 09:32:50 +0200 Subject: [PATCH] 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). --- .../Screens/OnlinePlay/Components/StarRatingRangeDisplay.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/OnlinePlay/Components/StarRatingRangeDisplay.cs b/osu.Game/Screens/OnlinePlay/Components/StarRatingRangeDisplay.cs index 00754df81b..f5b2bd018d 100644 --- a/osu.Game/Screens/OnlinePlay/Components/StarRatingRangeDisplay.cs +++ b/osu.Game/Screens/OnlinePlay/Components/StarRatingRangeDisplay.cs @@ -116,10 +116,10 @@ namespace osu.Game.Screens.OnlinePlay.Components else { // When Playlist is not empty (in room) we compute actual range - IEnumerable difficultyRangeSource = room.Playlist; + IReadOnlyList 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)