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

Merge pull request #2582 from smoogipoo/fix-hr-application

Fix HR mod affecting original beatmap difficulty
This commit is contained in:
Dean Herbert 2018-05-18 18:58:58 +09:00 committed by GitHub
commit 2938eadefb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

@ -1 +1 @@
Subproject commit fac688633b8fcf34ae5d0514c26b03e217161eb4
Subproject commit 80e78fd45bb79ca4bc46ecc05deb6058f3879faa

View File

@ -107,8 +107,14 @@ namespace osu.Game.Beatmaps
IBeatmap converted = converter.Convert();
// Apply difficulty mods
foreach (var mod in Mods.Value.OfType<IApplicableToDifficulty>())
mod.ApplyToDifficulty(converted.BeatmapInfo.BaseDifficulty);
if (Mods.Value.Any(m => m is IApplicableToDifficulty))
{
converted.BeatmapInfo = converted.BeatmapInfo.Clone();
converted.BeatmapInfo.BaseDifficulty = converted.BeatmapInfo.BaseDifficulty.Clone();
foreach (var mod in Mods.Value.OfType<IApplicableToDifficulty>())
mod.ApplyToDifficulty(converted.BeatmapInfo.BaseDifficulty);
}
// Post-process
rulesetInstance.CreateBeatmapProcessor(converted)?.PostProcess();