From 2a364b8cb31955991be5ce370a097d4c159cf943 Mon Sep 17 00:00:00 2001 From: asofold Date: Thu, 8 Nov 2012 10:10:25 +0100 Subject: [PATCH] SF: Clear buffer on resetFlyData, carefully reduce with onSetBack. --- .../nocheatplus/checks/moving/MovingData.java | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/fr/neatmonster/nocheatplus/checks/moving/MovingData.java b/src/fr/neatmonster/nocheatplus/checks/moving/MovingData.java index e32892dd..8be7c189 100644 --- a/src/fr/neatmonster/nocheatplus/checks/moving/MovingData.java +++ b/src/fr/neatmonster/nocheatplus/checks/moving/MovingData.java @@ -143,22 +143,22 @@ public class MovingData extends ACheckData { public Location setBack; public Location teleported; - /** - * Clear the data of the fly checks (not more-packets). - */ - public void clearFlyData() { - bunnyhopDelay = 0; - sfJumpPhase = 0; - jumpAmplifier = 0; - setBack = null; - sfLastYDist = Double.MAX_VALUE; - fromX = toX = Double.MAX_VALUE; - clearAccounting(); - clearNoFallData(); - // TODO: Check if to clear buffers etc - - } - + /** + * Clear the data of the fly checks (not more-packets). + */ + public void clearFlyData() { + bunnyhopDelay = 0; + sfJumpPhase = 0; + jumpAmplifier = 0; + setBack = null; + sfLastYDist = Double.MAX_VALUE; + fromX = toX = Double.MAX_VALUE; + clearAccounting(); + clearNoFallData(); + sfHorizontalBuffer = 0; + + } + /** * Mildly reset the flying data without losing any important information. * @@ -176,6 +176,7 @@ public class MovingData extends ACheckData { // Keep jump amplifier // Keep bunny-hop delay (?) // keep jump phase. + sfHorizontalBuffer = Math.min(0, sfHorizontalBuffer); } public void clearAccounting() {