From 888c18a90886eab7eff31dfa696683afbf948c45 Mon Sep 17 00:00:00 2001 From: asofold Date: Sat, 22 Feb 2014 13:03:00 +0100 Subject: [PATCH] Further confine pre-conditions for the sprintback check. --- .../neatmonster/nocheatplus/checks/moving/SurvivalFly.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index ee812f9c..b448a57b 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -233,10 +233,9 @@ public class SurvivalFly extends Check { } // Prevent players from sprinting if they're moving backwards (allow buffers to cover up !?). - if (sprinting && data.lostSprintCount == 0) { - // (Ignore if lost sprint is active, in order to forestall false positives.) - // TODO: Check if still necessary to check here with timeSprinting change (...). - // TODO: Find more ways to confine conditions. + if (sprinting && data.lostSprintCount == 0 && !cc.assumeSprint && hDistance > walkSpeed && data.hVelActive.isEmpty()) { + // (Ignore some cases, in order to prevent false positives.) + // TODO: speed effects ? final float yaw = from.getYaw(); if (xDistance < 0D && zDistance > 0D && yaw > 180F && yaw < 270F || xDistance < 0D && zDistance < 0D && yaw > 270F && yaw < 360F