1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-23 11:40:28 +08:00

Add distance factor to anti-doubletap (#37636)

Circles that are spaced from each other can't be doubletapped, therefore
they were excluded from the low OD penalty in speed.

Co-authored-by: StanR <8269193+stanriders@users.noreply.github.com>
This commit is contained in:
Givy120
2026-05-06 10:12:36 +03:00
committed by GitHub
Unverified
parent bf405fb9b0
commit 5a801e224f
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Utils;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Osu.Objects;
@@ -194,7 +195,10 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Preprocessing
double speedRatio = currDeltaTime / Math.Max(currDeltaTime, deltaDifference);
double windowRatio = Math.Pow(Math.Min(1, currDeltaTime / HitWindow(HitResult.Great)), 5);
return 1.0 - Math.Pow(speedRatio, 1 - windowRatio);
// Can't doubletap if circles don't intersect
double distanceFactor = Math.Pow(DifficultyCalculationUtils.ReverseLerp(LazyJumpDistance, NORMALISED_DIAMETER, NORMALISED_RADIUS), 2);
return 1.0 - Math.Pow(speedRatio, distanceFactor * (1 - windowRatio));
}
return 0;