Skip to content

Commit

Permalink
Do not allow working beatmap to switch to protected beatmap in song s…
Browse files Browse the repository at this point in the history
…elect

Principal fix to ppy#28880.
  • Loading branch information
bdach committed Jul 17, 2024
1 parent 5633297 commit 4c1f902
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions osu.Game/Screens/Select/SongSelect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,13 @@ private void updateCarouselSelection(ValueChangedEvent<WorkingBeatmap>? e = null
var beatmap = e?.NewValue ?? Beatmap.Value;
if (beatmap is DummyWorkingBeatmap || !this.IsCurrentScreen()) return;

if (beatmap.BeatmapSetInfo.Protected && e != null)
{
Logger.Log($"Denying working beatmap switch to protected beatmap {beatmap}");
Beatmap.Value = e.OldValue;
return;
}

Logger.Log($"Song select working beatmap updated to {beatmap}");

if (!Carousel.SelectBeatmap(beatmap.BeatmapInfo, false))
Expand Down

0 comments on commit 4c1f902

Please sign in to comment.