Skip to content

Commit

Permalink
Rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Nov 2, 2022
1 parent 9065cb0 commit 5448c02
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions osu.Game.Rulesets.Taiko/Difficulty/TaikoPerformanceCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
effectiveMissCount = Math.Max(1.0, 1000.0 / totalSuccessfulHits) * countMiss;

// TODO: The detection of rulesets is temporary until the leftover old skills have been reworked.
bool rulesetTaiko = score.BeatmapInfo.Ruleset.OnlineID == 1;
bool taikoSpecificBeatmap = score.BeatmapInfo.Ruleset.OnlineID == 1;

double multiplier = 1.13;

Expand All @@ -54,8 +54,8 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
if (score.Mods.Any(m => m is ModEasy))
multiplier *= 0.975;

double difficultyValue = computeDifficultyValue(score, taikoAttributes, rulesetTaiko);
double accuracyValue = computeAccuracyValue(score, taikoAttributes, rulesetTaiko);
double difficultyValue = computeDifficultyValue(score, taikoAttributes, taikoSpecificBeatmap);
double accuracyValue = computeAccuracyValue(score, taikoAttributes, taikoSpecificBeatmap);
double totalValue =
Math.Pow(
Math.Pow(difficultyValue, 1.1) +
Expand All @@ -71,7 +71,7 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
};
}

private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes attributes, bool rulesetTaiko)
private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes attributes, bool taikoSpecificBeatmap)
{
double difficultyValue = Math.Pow(5 * Math.Max(1.0, attributes.StarRating / 0.115) - 4.0, 2.25) / 1150.0;

Expand All @@ -83,7 +83,7 @@ private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes
if (score.Mods.Any(m => m is ModEasy))
difficultyValue *= 0.985;

if (score.Mods.Any(m => m is ModHidden) && rulesetTaiko)
if (score.Mods.Any(m => m is ModHidden) && taikoSpecificBeatmap)
difficultyValue *= 1.025;

if (score.Mods.Any(m => m is ModHardRock))
Expand All @@ -95,7 +95,7 @@ private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes
return difficultyValue * Math.Pow(accuracy, 2.0);
}

private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes attributes, bool rulesetTaiko)
private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes attributes, bool taikoSpecificBeatmap)
{
if (attributes.GreatHitWindow <= 0)
return 0;
Expand All @@ -106,7 +106,7 @@ private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes a
accuracyValue *= lengthBonus;

// Slight HDFL Bonus for accuracy. A clamp is used to prevent against negative values.
if (score.Mods.Any(m => m is ModFlashlight<TaikoHitObject>) && score.Mods.Any(m => m is ModHidden) && rulesetTaiko)
if (score.Mods.Any(m => m is ModFlashlight<TaikoHitObject>) && score.Mods.Any(m => m is ModHidden) && taikoSpecificBeatmap)
accuracyValue *= Math.Max(1.0, 1.1 * lengthBonus);

return accuracyValue;
Expand Down

0 comments on commit 5448c02

Please sign in to comment.