mirror of https://github.com/ppy/osu
Fix classic scoring overflowing in osu! ruleset due to integer multiplication overflow
Closes https://github.com/ppy/osu/issues/25545.
This commit is contained in:
parent
3441a9a5b5
commit
e28e0ef1cc
|
@ -50,7 +50,7 @@ private static long convertStandardisedToClassic(int rulesetId, long standardise
|
|||
switch (rulesetId)
|
||||
{
|
||||
case 0:
|
||||
return (long)Math.Round((objectCount * objectCount * 32.57 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
return (long)Math.Round((Math.Pow(objectCount, 2) * 32.57 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
|
||||
case 1:
|
||||
return (long)Math.Round((objectCount * 1109 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||
|
|
Loading…
Reference in New Issue