Skip to content

Commit

Permalink
Fix PP not being calculated correctly for nightcore scores
Browse files Browse the repository at this point in the history
I guess this would be one way to roll forward with
ppy/osu#24640, but there is a chance something
somewhere else could have relied on the inheritance and might now break,
so not sure whether this should be the solution here...

Check is slightly rewritten since it wasn't making much sense to me
previously (why add nightcore to allowed mods if double time is
selected?)
  • Loading branch information
bdach committed Oct 19, 2023
1 parent e9111eb commit 98f090d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PerformanceCalculator/LegacyHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static Mod[] ConvertToLegacyDifficultyAdjustmentMods(BeatmapInfo beatmapI
.ToHashSet();

// Special case to allow either DT or NC.
if (mods.Any(m => m is ModDoubleTime))
if (allowedMods.Any(type => type.IsSubclassOf(typeof(ModDoubleTime))) && mods.Any(m => m is ModNightcore))
allowedMods.Add(allMods.Single(m => m is ModNightcore).GetType());

var result = new List<Mod>();
Expand Down
2 changes: 1 addition & 1 deletion PerformanceCalculatorGUI/RulesetHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static Mod[] ConvertToLegacyDifficultyAdjustmentMods(Ruleset ruleset, Mod
.ToHashSet();

// Special case to allow either DT or NC.
if (mods.Any(m => m is ModDoubleTime))
if (allowedMods.Any(type => type.IsSubclassOf(typeof(ModDoubleTime))) && mods.Any(m => m is ModNightcore))
allowedMods.Add(allMods.Single(m => m is ModNightcore).GetType());

var result = new List<Mod>();
Expand Down

0 comments on commit 98f090d

Please sign in to comment.