From 6e602af81670661aeaf9e9eba322b5c9bcaaab87 Mon Sep 17 00:00:00 2001 From: asofold Date: Sat, 28 Nov 2015 09:54:27 +0100 Subject: [PATCH] Remove the unused velocitygraceticks thing. --- .../nocheatplus/checks/moving/MovingConfig.java | 5 ++--- .../nocheatplus/checks/moving/SurvivalFly.java | 13 ------------- .../neatmonster/nocheatplus/config/ConfPaths.java | 3 ++- .../nocheatplus/config/DefaultConfig.java | 1 - 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingConfig.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingConfig.java index e2d8f4d5..78b20f20 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingConfig.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingConfig.java @@ -152,9 +152,9 @@ public class MovingConfig extends ACheckConfig { public final double sfHoverViolation; // Special tolerance values: - /** This is not strictly ticks, but packets, for now.*/ - public final int velocityGraceTicks; + /** Number of moving packets until which a velocity entry must be activated, in order to not be removed.*/ public final int velocityActivationCounter; + /** Server ticks until invalidating queues velocity. */ public final int velocityActivationTicks; public final boolean velocityStrictInvalidation; public final double noFallyOnGround; @@ -262,7 +262,6 @@ public class MovingConfig extends ACheckConfig { sfHoverFallDamage = config.getBoolean(ConfPaths.MOVING_SURVIVALFLY_HOVER_FALLDAMAGE); sfHoverViolation = config.getDouble(ConfPaths.MOVING_SURVIVALFLY_HOVER_SFVIOLATION); - velocityGraceTicks = config.getInt(ConfPaths.MOVING_VELOCITY_GRACETICKS); velocityActivationCounter = config.getInt(ConfPaths.MOVING_VELOCITY_ACTIVATIONCOUNTER); velocityActivationTicks = config.getInt(ConfPaths.MOVING_VELOCITY_ACTIVATIONTICKS); velocityStrictInvalidation = config.getBoolean(ConfPaths.MOVING_VELOCITY_STRICTINVALIDATION); 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 19369dd8..22cf1307 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 @@ -469,14 +469,6 @@ public class SurvivalFly extends Check { data.insideMediumCount ++; } - // // Invalidation of vertical velocity. - // // TODO: This invalidation is wrong in case of already jumped higher (can not be repaired?). - // if (yDistance <= 0 && data.sfLastYDist > 0 && data.sfLastYDist != Double.MAX_VALUE - // && data.invalidateVerVelGrace(cc.velocityGraceTicks, false)) { - // // (Only prevent counting further up, leaves the freedom.) - // tags.add("cap_vvel"); // TODO: Test / validate by logs. - // } - // Apply reset conditions. if (resetTo) { // The player has moved onto ground. @@ -525,11 +517,6 @@ public class SurvivalFly extends Check { // Invalidate used horizontal velocity. // NCPAPIProvider.getNoCheatPlusAPI().getLogManager().debug(Streams.TRACE_FILE, "*** INVALIDATE ON SPEED"); data.clearActiveHorVel(); - // if (data.horizontalVelocityUsed > cc.velocityGraceTicks) { - // data.horizontalFreedom = 0; - // data.horizontalVelocityCounter = 0; - // data.horizontalVelocityUsed = 0; - // } } // Adjust data. data.toWasReset = resetTo || data.noFallAssumeGround; diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java index 0d86ce2f..d9ae91df 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfPaths.java @@ -582,7 +582,6 @@ public abstract class ConfPaths { // Special (to be sorted in or factored out). private static final String MOVING_VELOCITY = MOVING + "velocity."; - public static final String MOVING_VELOCITY_GRACETICKS = MOVING_VELOCITY + "graceticks"; public static final String MOVING_VELOCITY_ACTIVATIONCOUNTER = MOVING_VELOCITY + "activationcounter"; public static final String MOVING_VELOCITY_ACTIVATIONTICKS = MOVING_VELOCITY + "activationticks"; public static final String MOVING_VELOCITY_STRICTINVALIDATION = MOVING_VELOCITY + "strictinvalidation"; @@ -729,5 +728,7 @@ public abstract class ConfPaths { public static final String MOVING_SURVIVALFLY_BEDSTEP ="checks.moving.survivalfly.bedstep"; @Deprecated public static final String LOGGING_BACKEND_CONSOLE_PREFIX = "logging.backend.console.prefix"; + @Deprecated + public static final String MOVING_VELOCITY_GRACETICKS = "checks.moving.velocity.graceticks"; } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java index 1c5b76fd..ab755558 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -429,7 +429,6 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.MOVING_VEHICLES_ENFORCELOCATION, "default"); // Velocity. - set(ConfPaths.MOVING_VELOCITY_GRACETICKS, 20); set(ConfPaths.MOVING_VELOCITY_ACTIVATIONCOUNTER, 80); set(ConfPaths.MOVING_VELOCITY_ACTIVATIONTICKS, 140); set(ConfPaths.MOVING_VELOCITY_STRICTINVALIDATION, true);