Compare raw angle values instead of rounding angles

This commit is contained in:
MBmasher 2022-08-26 20:40:18 +10:00
parent 5082ee26cf
commit 249c3f868f
1 changed files with 1 additions and 8 deletions

View File

@ -49,11 +49,6 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool hidd
double angleRepeatCount = 0.0;
// We want to round angles to make abusing the nerf a bit harder.
double initialRoundedAngle = 0.0;
if (osuCurrent.Angle != null)
initialRoundedAngle = Math.Round(MathUtils.RadiansToDegrees(osuCurrent.Angle.Value) / 2.0) * 2.0;
// This is iterating backwards in time from the current object.
for (int i = 0; i < Math.Min(current.Index, 10); i++)
{
@ -80,10 +75,8 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current, bool hidd
if (currentObj.Angle != null && osuCurrent.Angle != null)
{
double roundedAngle = Math.Round(MathUtils.RadiansToDegrees(currentObj.Angle.Value) / 2.0) * 2.0;
// Objects further back in time should count less for the nerf.
if (roundedAngle == initialRoundedAngle)
if (Math.Abs(currentObj.Angle.Value - osuCurrent.Angle.Value) < 0.02)
angleRepeatCount += Math.Max(1.0 - 0.1 * i, 0.0);
}
}