mirror of https://github.com/ppy/osu
Merge pull request #30424 from bdach/wtf-wtf-wtf-wtf
Do not fall back to beatmap's original ruleset if conversion fails
This commit is contained in:
commit
904b76b9d7
|
@ -43,6 +43,7 @@ protected void PerformTest(List<ReplayFrame> frames, Beatmap<TaikoHitObject>? be
|
|||
AddStep("load player", () =>
|
||||
{
|
||||
Beatmap.Value = CreateWorkingBeatmap(beatmap);
|
||||
Ruleset.Value = new TaikoRuleset().RulesetInfo;
|
||||
SelectedMods.Value = mods ?? Array.Empty<Mod>();
|
||||
|
||||
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue