1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 03:02:54 +08:00
This commit is contained in:
02Naitsirk 2025-01-14 15:36:28 -05:00
commit db552d2309
2 changed files with 6 additions and 10 deletions

View File

@ -120,7 +120,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
double aimValue = computeAimValue(score, osuAttributes); double aimValue = computeAimValue(score, osuAttributes);
double speedValue = computeSpeedValue(score, osuAttributes); double speedValue = computeSpeedValue(score, osuAttributes);
double accuracyValue = computeAccuracyValue(score, osuAttributes); double accuracyValue = computeAccuracyValue(score);
double flashlightValue = computeFlashlightValue(score, osuAttributes); double flashlightValue = computeFlashlightValue(score, osuAttributes);
double totalValue = double totalValue =
@ -269,7 +269,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
return speedValue; return speedValue;
} }
private double computeAccuracyValue(ScoreInfo score, OsuDifficultyAttributes attributes) private double computeAccuracyValue(ScoreInfo score)
{ {
if (score.Mods.Any(h => h is OsuModRelax) || deviation == null) if (score.Mods.Any(h => h is OsuModRelax) || deviation == null)
return 0.0; return 0.0;
@ -290,7 +290,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private double computeFlashlightValue(ScoreInfo score, OsuDifficultyAttributes attributes) private double computeFlashlightValue(ScoreInfo score, OsuDifficultyAttributes attributes)
{ {
if (!score.Mods.Any(h => h is OsuModFlashlight)) if (!score.Mods.Any(h => h is OsuModFlashlight) || deviation == null)
return 0.0; return 0.0;
double flashlightValue = Flashlight.DifficultyToPerformance(attributes.FlashlightDifficulty); double flashlightValue = Flashlight.DifficultyToPerformance(attributes.FlashlightDifficulty);
@ -315,10 +315,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty
/// Estimates player's deviation on speed notes. /// Estimates player's deviation on speed notes.
/// Treats all speed notes as hit circles. /// Treats all speed notes as hit circles.
/// </summary> /// </summary>
private double calculateSpeedDeviation(OsuDifficultyAttributes attributes) private double? calculateSpeedDeviation(OsuDifficultyAttributes attributes)
{ {
if (totalSuccessfulHits == 0) if (totalSuccessfulHits == 0)
return double.PositiveInfinity; return null;
double hitWindow300 = attributes.GreatHitWindow; double hitWindow300 = attributes.GreatHitWindow;
double hitWindow100 = attributes.OkHitWindow; double hitWindow100 = attributes.OkHitWindow;
@ -354,7 +354,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
return deviationOnCircles; return deviationOnCircles;
} }
return double.PositiveInfinity; return null;
} }
/// <summary> /// <summary>

View File

@ -12,10 +12,6 @@
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
</ItemGroup>
<ItemGroup Label="Project References"> <ItemGroup Label="Project References">
<ProjectReference Include="..\osu.Game\osu.Game.csproj" /> <ProjectReference Include="..\osu.Game\osu.Game.csproj" />
</ItemGroup> </ItemGroup>