mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Fix overflow
This commit is contained in:
parent
2334be1987
commit
4198e025fa
@ -246,11 +246,11 @@ namespace osu.Game.Database
|
|||||||
double modMultiplier = score.Mods.Select(m => m.ScoreMultiplier).Aggregate(1.0, (c, n) => c * n);
|
double modMultiplier = score.Mods.Select(m => m.ScoreMultiplier).Aggregate(1.0, (c, n) => c * n);
|
||||||
|
|
||||||
int maximumLegacyAccuracyScore = attributes.AccuracyScore;
|
int maximumLegacyAccuracyScore = attributes.AccuracyScore;
|
||||||
int maximumLegacyComboScore = (int)Math.Round(attributes.ComboScore * modMultiplier);
|
long maximumLegacyComboScore = (long)Math.Round(attributes.ComboScore * modMultiplier);
|
||||||
double maximumLegacyBonusRatio = attributes.BonusScoreRatio;
|
double maximumLegacyBonusRatio = attributes.BonusScoreRatio;
|
||||||
|
|
||||||
// The part of total score that doesn't include bonus.
|
// The part of total score that doesn't include bonus.
|
||||||
int maximumLegacyBaseScore = maximumLegacyAccuracyScore + maximumLegacyComboScore;
|
long maximumLegacyBaseScore = maximumLegacyAccuracyScore + maximumLegacyComboScore;
|
||||||
|
|
||||||
// The combo proportion is calculated as a proportion of maximumLegacyBaseScore.
|
// The combo proportion is calculated as a proportion of maximumLegacyBaseScore.
|
||||||
double comboProportion = Math.Min(1, (double)score.LegacyTotalScore / maximumLegacyBaseScore);
|
double comboProportion = Math.Min(1, (double)score.LegacyTotalScore / maximumLegacyBaseScore);
|
||||||
|
Loading…
Reference in New Issue
Block a user