1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Do not allow working beatmap to switch to protected beatmap in song select

Principal fix to https://github.com/ppy/osu/issues/28880.
This commit is contained in:
Bartłomiej Dach 2024-07-17 11:46:17 +02:00
parent 5633297d1c
commit 4c1f902969
No known key found for this signature in database

View File

@ -505,6 +505,13 @@ namespace osu.Game.Screens.Select
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))