mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Avoid NaN values during ApplyBeatmap processing()
This commit is contained in:
parent
7cbf48ffcf
commit
2ae34530f7
@ -25,12 +25,13 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
||||
|
||||
protected override double ComputeTotalScore()
|
||||
{
|
||||
double comboRatio = MaxComboPortion > 0 ? ComboPortion / MaxComboPortion : 1;
|
||||
double fruitHitsRatio = maximumTinyDroplets == 0 ? 0 : (double)hitTinyDroplets / maximumTinyDroplets;
|
||||
|
||||
const int tiny_droplets_portion = 400000;
|
||||
|
||||
return (
|
||||
((1000000 - tiny_droplets_portion) + tiny_droplets_portion * (1 - tinyDropletScale)) * ComboPortion / MaxComboPortion +
|
||||
((1000000 - tiny_droplets_portion) + tiny_droplets_portion * (1 - tinyDropletScale)) * comboRatio +
|
||||
tiny_droplets_portion * tinyDropletScale * fruitHitsRatio +
|
||||
BonusPortion
|
||||
) * ScoreMultiplier;
|
||||
|
@ -18,9 +18,12 @@ namespace osu.Game.Rulesets.Mania.Scoring
|
||||
|
||||
protected override double ComputeTotalScore()
|
||||
{
|
||||
double comboRatio = MaxComboPortion > 0 ? ComboPortion / MaxComboPortion : 1;
|
||||
double accuracyRatio = MaxBasicJudgements > 0 ? (double)CurrentBasicJudgements / MaxBasicJudgements : 1;
|
||||
|
||||
return (
|
||||
200000 * ComboPortion / MaxComboPortion +
|
||||
800000 * Math.Pow(Accuracy.Value, 2 + 2 * Accuracy.Value) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||
200000 * comboRatio +
|
||||
800000 * Math.Pow(Accuracy.Value, 2 + 2 * Accuracy.Value) * accuracyRatio +
|
||||
BonusPortion
|
||||
) * ScoreMultiplier;
|
||||
}
|
||||
|
@ -15,9 +15,12 @@ namespace osu.Game.Rulesets.Osu.Scoring
|
||||
|
||||
protected override double ComputeTotalScore()
|
||||
{
|
||||
double comboRatio = MaxComboPortion > 0 ? ComboPortion / MaxComboPortion : 1;
|
||||
double accuracyRatio = MaxBasicJudgements > 0 ? (double)CurrentBasicJudgements / MaxBasicJudgements : 1;
|
||||
|
||||
return (
|
||||
700000 * ComboPortion / MaxComboPortion +
|
||||
300000 * Math.Pow(Accuracy.Value, 10) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||
700000 * comboRatio +
|
||||
300000 * Math.Pow(Accuracy.Value, 10) * accuracyRatio +
|
||||
BonusPortion
|
||||
) * ScoreMultiplier;
|
||||
}
|
||||
|
@ -19,9 +19,12 @@ namespace osu.Game.Rulesets.Taiko.Scoring
|
||||
|
||||
protected override double ComputeTotalScore()
|
||||
{
|
||||
double comboRatio = MaxComboPortion > 0 ? ComboPortion / MaxComboPortion : 1;
|
||||
double accuracyRatio = MaxBasicJudgements > 0 ? (double)CurrentBasicJudgements / MaxBasicJudgements : 1;
|
||||
|
||||
return (
|
||||
250000 * ComboPortion / MaxComboPortion +
|
||||
750000 * Math.Pow(Accuracy.Value, 3.6) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||
250000 * comboRatio +
|
||||
750000 * Math.Pow(Accuracy.Value, 3.6) * accuracyRatio +
|
||||
BonusPortion
|
||||
) * ScoreMultiplier;
|
||||
}
|
||||
|
@ -288,11 +288,14 @@ namespace osu.Game.Rulesets.Scoring
|
||||
|
||||
protected virtual double ComputeTotalScore()
|
||||
{
|
||||
double comboRatio = MaxComboPortion > 0 ? ComboPortion / MaxComboPortion : 1;
|
||||
double accuracyRatio = MaxBasicJudgements > 0 ? (double)CurrentBasicJudgements / MaxBasicJudgements : 1;
|
||||
|
||||
return
|
||||
(int)Math.Round
|
||||
((
|
||||
700000 * ComboPortion / MaxComboPortion +
|
||||
300000 * Math.Pow(Accuracy.Value, 10) * ((double)CurrentBasicJudgements / MaxBasicJudgements) +
|
||||
700000 * comboRatio +
|
||||
300000 * Math.Pow(Accuracy.Value, 10) * accuracyRatio +
|
||||
BonusPortion
|
||||
) * ScoreMultiplier);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user