Skip to content

Commit

Permalink
Fix score migration not considering mod multipliers
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach authored and peppy committed Jun 14, 2023
1 parent c134a13 commit 1e8177f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion osu.Game/Database/StandardisedScoreMigrationTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static long GetNewStandardised(ScoreInfo score)
foreach (var judgement in maximumJudgements)
beatmap.HitObjects.Add(new FakeHit(judgement));
processor.ApplyBeatmap(beatmap);
processor.Mods.Value = score.Mods;

// Insert all misses into a queue.
// These will be nibbled at whenever we need to reset the combo.
Expand Down Expand Up @@ -162,7 +163,12 @@ public static long GetOldStandardised(ScoreInfo score)
break;
}

return (long)(1000000 * (accuracyPortion * accuracyScore + (1 - accuracyPortion) * comboScore) + bonusScore);
double modMultiplier = 1;

foreach (var mod in score.Mods)
modMultiplier *= mod.ScoreMultiplier;

return (long)((1000000 * (accuracyPortion * accuracyScore + (1 - accuracyPortion) * comboScore) + bonusScore) * modMultiplier);
}

private class FakeHit : HitObject
Expand Down

0 comments on commit 1e8177f

Please sign in to comment.