mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
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 @@ namespace osu.Game.Scoring.Legacy
|
|||||||
switch (rulesetId)
|
switch (rulesetId)
|
||||||
{
|
{
|
||||||
case 0:
|
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:
|
case 1:
|
||||||
return (long)Math.Round((objectCount * 1109 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
return (long)Math.Round((objectCount * 1109 + 100000) * standardisedTotalScore / ScoreProcessor.MAX_SCORE);
|
||||||
|
Loading…
Reference in New Issue
Block a user