From 9902c22f5c91afb3a804f632dc89d13e3ab44025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 25 Oct 2024 13:16:24 +0200 Subject: [PATCH] Do not fall back to beatmap's original ruleset if conversion fails I don't know why this was ever a good idea, and would say that we want this to fail *hard* not soft. If things ever get in this state, things have gone *seriously* wrong elsewhere, and need to be fixed there. --- osu.Game/Screens/Play/Player.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 536050c9bd..398e8df5c9 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -562,11 +562,8 @@ private IBeatmap loadPlayableBeatmap(Mod[] gameplayMods, CancellationToken cance } catch (BeatmapInvalidForRulesetException) { - // A playable beatmap may not be creatable with the user's preferred ruleset, so try using the beatmap's default ruleset - rulesetInfo = Beatmap.Value.BeatmapInfo.Ruleset; - ruleset = rulesetInfo.CreateInstance(); - - playable = Beatmap.Value.GetPlayableBeatmap(rulesetInfo, gameplayMods, cancellationToken); + Logger.Log($"The current beatmap is not playable in {ruleset.RulesetInfo.Name}!", level: LogLevel.Important); + return null; } if (playable.HitObjects.Count == 0)