diff --git a/osu.Game.Rulesets.Catch/Tests/TestCasePerformancePoints.cs b/osu.Game.Rulesets.Catch/Tests/TestCasePerformancePoints.cs
index 071367b305..6643316f15 100644
--- a/osu.Game.Rulesets.Catch/Tests/TestCasePerformancePoints.cs
+++ b/osu.Game.Rulesets.Catch/Tests/TestCasePerformancePoints.cs
@@ -3,7 +3,7 @@
namespace osu.Game.Rulesets.Catch.Tests
{
- public class TestCasePerformancePoints : osu.Game.Tests.Visual.TestCasePerformancePoints
+ public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints
{
public TestCasePerformancePoints()
: base(new CatchRuleset(new RulesetInfo()))
diff --git a/osu.Game.Rulesets.Mania/Tests/TestCasePerformancePoints.cs b/osu.Game.Rulesets.Mania/Tests/TestCasePerformancePoints.cs
index 420465c045..e60808b1a6 100644
--- a/osu.Game.Rulesets.Mania/Tests/TestCasePerformancePoints.cs
+++ b/osu.Game.Rulesets.Mania/Tests/TestCasePerformancePoints.cs
@@ -3,7 +3,7 @@
namespace osu.Game.Rulesets.Mania.Tests
{
- public class TestCasePerformancePoints : osu.Game.Tests.Visual.TestCasePerformancePoints
+ public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints
{
public TestCasePerformancePoints()
: base(new ManiaRuleset(new RulesetInfo()))
diff --git a/osu.Game.Rulesets.Osu/OsuDifficulty/OsuDifficultyCalculator.cs b/osu.Game.Rulesets.Osu/OsuDifficulty/OsuDifficultyCalculator.cs
index 537874f643..3ab1a60443 100644
--- a/osu.Game.Rulesets.Osu/OsuDifficulty/OsuDifficultyCalculator.cs
+++ b/osu.Game.Rulesets.Osu/OsuDifficulty/OsuDifficultyCalculator.cs
@@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty
}
foreach (Skill s in skills)
- s.Process(h);
+ s.Process(h, TimeRate);
}
double aimRating = Math.Sqrt(skills[0].DifficultyValue()) * difficulty_multiplier;
diff --git a/osu.Game.Rulesets.Osu/OsuDifficulty/Skills/Skill.cs b/osu.Game.Rulesets.Osu/OsuDifficulty/Skills/Skill.cs
index b9632e18e2..ae75a4449b 100644
--- a/osu.Game.Rulesets.Osu/OsuDifficulty/Skills/Skill.cs
+++ b/osu.Game.Rulesets.Osu/OsuDifficulty/Skills/Skill.cs
@@ -38,9 +38,9 @@ namespace osu.Game.Rulesets.Osu.OsuDifficulty.Skills
///
/// Process an and update current strain values accordingly.
///
- public void Process(OsuDifficultyHitObject current)
+ public void Process(OsuDifficultyHitObject current, double timeRate)
{
- currentStrain *= strainDecay(current.DeltaTime);
+ currentStrain *= strainDecay(current.DeltaTime / timeRate);
if (!(current.BaseObject is Spinner))
currentStrain += StrainValueOf(current) * SkillMultiplier;
diff --git a/osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs
index 32469b1bf7..93003925ef 100644
--- a/osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs
+++ b/osu.Game.Rulesets.Osu/Scoring/OsuPerformanceCalculator.cs
@@ -4,7 +4,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Beatmaps;
@@ -32,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
{
countHitCircles = Beatmap.HitObjects.Count(h => h is HitCircle);
- beatmapMaxCombo = Beatmap.HitObjects.Count();
+ beatmapMaxCombo = Beatmap.HitObjects.Count;
beatmapMaxCombo += Beatmap.HitObjects.OfType().Sum(s => s.RepeatCount + s.Ticks.Count());
}
@@ -84,10 +83,10 @@ namespace osu.Game.Rulesets.Osu.Scoring
double aimValue = Math.Pow(5.0f * Math.Max(1.0f, double.Parse(Attributes["Aim"]) / 0.0675f) - 4.0f, 3.0f) / 100000.0f;
// Longer maps are worth more
- double LengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
+ double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
(totalHits > 2000 ? Math.Log10(totalHits / 2000.0f) * 0.5f : 0.0f);
- aimValue *= LengthBonus;
+ aimValue *= lengthBonus;
// Penalize misses exponentially. This mainly fixes tag4 maps and the likes until a per-hitobject solution is available
aimValue *= Math.Pow(0.97f, countMiss);
@@ -117,13 +116,13 @@ namespace osu.Game.Rulesets.Osu.Scoring
if (mods.Any(h => h is OsuModFlashlight))
{
// Apply length bonus again if flashlight is on simply because it becomes a lot harder on longer maps.
- aimValue *= 1.45f * LengthBonus;
+ aimValue *= 1.45f * lengthBonus;
}
// Scale the aim value with accuracy _slightly_
aimValue *= 0.5f + accuracy / 2.0f;
// It is important to also consider accuracy difficulty when doing that
- aimValue *= 0.98f + (Math.Pow(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty, 2) / 2500);
+ aimValue *= 0.98f + Math.Pow(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty, 2) / 2500;
return aimValue;
}
@@ -146,7 +145,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
// Scale the speed value with accuracy _slightly_
speedValue *= 0.5f + accuracy / 2.0f;
// It is important to also consider accuracy difficulty when doing that
- speedValue *= 0.98f + (Math.Pow(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty, 2) / 2500);
+ speedValue *= 0.98f + Math.Pow(Beatmap.BeatmapInfo.BaseDifficulty.OverallDifficulty, 2) / 2500;
return speedValue;
}
@@ -154,7 +153,7 @@ namespace osu.Game.Rulesets.Osu.Scoring
private double computeAccuracyValue()
{
// This percentage only considers HitCircles of any value - in this part of the calculation we focus on hitting the timing hit window
- double betterAccuracyPercentage = 0;
+ double betterAccuracyPercentage;
int amountHitObjectsWithAccuracy = countHitCircles;
if (amountHitObjectsWithAccuracy > 0)
diff --git a/osu.Game.Rulesets.Osu/Tests/TestCasePerformancePoints.cs b/osu.Game.Rulesets.Osu/Tests/TestCasePerformancePoints.cs
index b430803907..36590b484f 100644
--- a/osu.Game.Rulesets.Osu/Tests/TestCasePerformancePoints.cs
+++ b/osu.Game.Rulesets.Osu/Tests/TestCasePerformancePoints.cs
@@ -3,7 +3,7 @@
namespace osu.Game.Rulesets.Osu.Tests
{
- public class TestCasePerformancePoints : osu.Game.Tests.Visual.TestCasePerformancePoints
+ public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints
{
public TestCasePerformancePoints()
: base(new OsuRuleset(new RulesetInfo()))
diff --git a/osu.Game.Rulesets.Taiko/Tests/TestCasePerformancePoints.cs b/osu.Game.Rulesets.Taiko/Tests/TestCasePerformancePoints.cs
index a60c79fc6a..269aca2cd9 100644
--- a/osu.Game.Rulesets.Taiko/Tests/TestCasePerformancePoints.cs
+++ b/osu.Game.Rulesets.Taiko/Tests/TestCasePerformancePoints.cs
@@ -3,7 +3,7 @@
namespace osu.Game.Rulesets.Taiko.Tests
{
- public class TestCasePerformancePoints : osu.Game.Tests.Visual.TestCasePerformancePoints
+ public class TestCasePerformancePoints : Game.Tests.Visual.TestCasePerformancePoints
{
public TestCasePerformancePoints()
: base(new TaikoRuleset(new RulesetInfo()))
diff --git a/osu.Game/Rulesets/Scoring/PerformanceCalculator.cs b/osu.Game/Rulesets/Scoring/PerformanceCalculator.cs
index 49b7ac54c6..359d6589ed 100644
--- a/osu.Game/Rulesets/Scoring/PerformanceCalculator.cs
+++ b/osu.Game/Rulesets/Scoring/PerformanceCalculator.cs
@@ -21,7 +21,7 @@ namespace osu.Game.Rulesets.Scoring
protected readonly Beatmap Beatmap;
protected readonly Score Score;
- public PerformanceCalculator(Ruleset ruleset, Beatmap beatmap, Score score)
+ protected PerformanceCalculator(Ruleset ruleset, Beatmap beatmap, Score score)
{
Beatmap = CreateBeatmapConverter().Convert(beatmap);
Score = score;
diff --git a/osu.Game/Tests/Visual/TestCasePerformancePoints.cs b/osu.Game/Tests/Visual/TestCasePerformancePoints.cs
index 3a1fc20060..cd1005593e 100644
--- a/osu.Game/Tests/Visual/TestCasePerformancePoints.cs
+++ b/osu.Game/Tests/Visual/TestCasePerformancePoints.cs
@@ -12,15 +12,12 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
-using osu.Framework.Graphics.Sprites;
using osu.Framework.Input;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
-using osu.Game.Overlays;
-using osu.Game.Overlays.Music;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
@@ -29,7 +26,7 @@ namespace osu.Game.Tests.Visual
{
public abstract class TestCasePerformancePoints : OsuTestCase
{
- public TestCasePerformancePoints(Ruleset ruleset)
+ protected TestCasePerformancePoints(Ruleset ruleset)
{
Child = new GridContainer
{
@@ -49,7 +46,7 @@ namespace osu.Game.Tests.Visual
Colour = Color4.Black,
Alpha = 0.5f,
},
- new ScrollContainer(Direction.Vertical)
+ new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = new BeatmapList(ruleset)
@@ -68,7 +65,7 @@ namespace osu.Game.Tests.Visual
Colour = Color4.Black,
Alpha = 0.5f,
},
- new ScrollContainer(Direction.Vertical)
+ new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = new StarRatingGrid()
@@ -87,7 +84,7 @@ namespace osu.Game.Tests.Visual
Colour = Color4.Black,
Alpha = 0.5f,
},
- new ScrollContainer(Direction.Vertical)
+ new ScrollContainer
{
RelativeSizeAxes = Axes.Both,
Child = new PerformanceList()
@@ -127,7 +124,7 @@ namespace osu.Game.Tests.Visual
}
[BackgroundDependencyLoader]
- private void load(OsuGameBase osuGame, BeatmapManager beatmaps)
+ private void load(BeatmapManager beatmaps)
{
var sets = beatmaps.GetAllUsableBeatmapSets();
var allBeatmaps = sets.SelectMany(s => s.Beatmaps).Where(b => ruleset.LegacyID < 0 || b.RulesetID == ruleset.LegacyID);
@@ -186,7 +183,6 @@ namespace osu.Game.Tests.Visual
this.osuGame = osuGame;
this.beatmaps = beatmaps;
- var working = beatmaps.GetWorkingBeatmap(beatmap);
text.Text = $"{beatmap.Metadata.Artist} - {beatmap.Metadata.Title} ({beatmap.Metadata.AuthorString}) [{beatmap.Version}]";
osuGame.Beatmap.ValueChanged += beatmapChanged;
@@ -372,7 +368,7 @@ namespace osu.Game.Tests.Visual
totalText.Text = $"Star rating: {totalSr:n2}";
foreach (var kvp in categories)
- categoryTexts.Add(new OsuSpriteText { Text = $"{kvp.Key}: {kvp.Value:n2}" });
+ categoryTexts.Add(new OsuSpriteText { Text = $"{kvp.Key}: {kvp.Value}" });
}
informationCache.Validate();