1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Do not run legacy conversion with ScoreV2 mod present

This commit is contained in:
Bartłomiej Dach 2023-07-09 17:01:28 +02:00
parent 9377622cd4
commit e12255bbe5
No known key found for this signature in database

View File

@ -9,6 +9,7 @@ using osu.Game.Beatmaps;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
@ -205,6 +206,10 @@ namespace osu.Game.Database
if (ruleset is not ILegacyRuleset legacyRuleset)
return score.TotalScore;
var mods = score.Mods;
if (mods.Any(mod => mod is ModScoreV2))
return score.TotalScore;
var playableBeatmap = beatmap.GetPlayableBeatmap(ruleset.RulesetInfo, score.Mods);
if (playableBeatmap.HitObjects.Count == 0)
@ -212,7 +217,7 @@ namespace osu.Game.Database
ILegacyScoreSimulator sv1Simulator = legacyRuleset.CreateLegacyScoreSimulator();
sv1Simulator.Simulate(beatmap, playableBeatmap, score.Mods);
sv1Simulator.Simulate(beatmap, playableBeatmap, mods);
return ConvertFromLegacyTotalScore(score, new DifficultyAttributes
{