From 5a801e224fecbdbb996bf6c823fed825d87b75eb Mon Sep 17 00:00:00 2001 From: Givy120 <89256026+Givikap120@users.noreply.github.com> Date: Wed, 6 May 2026 10:12:36 +0300 Subject: [PATCH] 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> --- .../Difficulty/Preprocessing/OsuDifficultyHitObject.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs index 221b2c6378..413588749a 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Preprocessing/OsuDifficultyHitObject.cs @@ -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;