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.
This commit is contained in:
Bartłomiej Dach 2024-10-25 13:16:24 +02:00
parent 47aa2c2bfc
commit 9902c22f5c
No known key found for this signature in database
1 changed files with 2 additions and 5 deletions

View File

@ -562,11 +562,8 @@ private IBeatmap loadPlayableBeatmap(Mod[] gameplayMods, CancellationToken cance
} }
catch (BeatmapInvalidForRulesetException) catch (BeatmapInvalidForRulesetException)
{ {
// A playable beatmap may not be creatable with the user's preferred ruleset, so try using the beatmap's default ruleset Logger.Log($"The current beatmap is not playable in {ruleset.RulesetInfo.Name}!", level: LogLevel.Important);
rulesetInfo = Beatmap.Value.BeatmapInfo.Ruleset; return null;
ruleset = rulesetInfo.CreateInstance();
playable = Beatmap.Value.GetPlayableBeatmap(rulesetInfo, gameplayMods, cancellationToken);
} }
if (playable.HitObjects.Count == 0) if (playable.HitObjects.Count == 0)