Skip to content

Commit

Permalink
Merge pull request #2582 from smoogipoo/fix-hr-application
Browse files Browse the repository at this point in the history
Fix HR mod affecting original beatmap difficulty
  • Loading branch information
peppy committed May 18, 2018
2 parents cdd43f7 + 33baaf8 commit 2938ead
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions osu.Game/Beatmaps/WorkingBeatmap.cs
Expand Up @@ -107,8 +107,14 @@ public IBeatmap GetPlayableBeatmap(RulesetInfo ruleset)
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();
Expand Down

0 comments on commit 2938ead

Please sign in to comment.