From bf87a4b2d3802cfdd17b04f412fc9c9f9ab98799 Mon Sep 17 00:00:00 2001 From: apollo-dw <83023433+apollo-dw@users.noreply.github.com> Date: Fri, 3 Sep 2021 02:39:21 +0100 Subject: [PATCH] interpolate the doubletap cheese nerf instead --- osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs index c4230fc9a4..836e926cf1 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs @@ -2,11 +2,11 @@ // See the LICENCE file in the repository root for full licence text. using System; -using osu.Game.Beatmaps; using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Osu.Difficulty.Preprocessing; using osu.Game.Rulesets.Osu.Objects; +using osu.Framework.Utils; namespace osu.Game.Rulesets.Osu.Difficulty.Skills { @@ -47,9 +47,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills double deltaTime = current.DeltaTime; // Aim to nerf cheesy rhythms (Very fast consecutive doubles with large deltatimes between) - if (Previous.Count > 0 && deltaTime <= greatWindow) + double deltaTimeThreshold = greatWindow * 2; + + if (Previous.Count > 0 && deltaTime < deltaTimeThreshold && Previous[0].DeltaTime > deltaTime) { - deltaTime = Math.Max(Previous[0].DeltaTime, deltaTime); + double closenessToZero = Math.Min(1, deltaTime / deltaTimeThreshold); + deltaTime = Interpolation.Lerp(Previous[0].DeltaTime, deltaTime, closenessToZero); } // Cap deltatime to the OD 300 hitwindow.