From 8adab538c4b8864fb726baddacab78d0b521a96f Mon Sep 17 00:00:00 2001 From: asofold Date: Mon, 26 Oct 2015 02:32:36 +0100 Subject: [PATCH] Add LiftOffEnvelope.UNKNOWN as default, to distinguish from web. --- .../neatmonster/nocheatplus/checks/moving/MovingData.java | 4 ++-- .../nocheatplus/checks/moving/SurvivalFly.java | 1 - .../nocheatplus/checks/moving/model/LiftOffEnvelope.java | 8 +++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java index 67f5c460..608a1d22 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java @@ -99,7 +99,7 @@ public class MovingData extends ACheckData { * Default lift-off envelope, used after resetting.
* TODO: Test, might be better ground. */ - private static final LiftOffEnvelope defaultLiftOffEnvelope = LiftOffEnvelope.NO_JUMP; + private static final LiftOffEnvelope defaultLiftOffEnvelope = LiftOffEnvelope.UNKNOWN; /** Tolerance value for using vertical velocity (the client sends different values than received with fight damage). */ private static final double TOL_VVEL = 0.0625; @@ -895,7 +895,7 @@ public class MovingData extends ACheckData { liftOffEnvelope = LiftOffEnvelope.NORMAL; } else { - liftOffEnvelope = defaultLiftOffEnvelope; + liftOffEnvelope = LiftOffEnvelope.UNKNOWN; } } 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 432413fd..a5cdbc3e 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 @@ -403,7 +403,6 @@ public class SurvivalFly extends Check { // Check lift-off medium. // TODO: Web before liquid? Climbable? - // TODO: Web might be NO_JUMP ! // TODO: isNextToGround(0.15, 0.4) allows a little much (yMargin), but reduces false positives. // TODO: nextToGround: Shortcut with block-flags ? if (to.isInLiquid()) { diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/LiftOffEnvelope.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/LiftOffEnvelope.java index eea11d8a..4e1b7874 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/LiftOffEnvelope.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/model/LiftOffEnvelope.java @@ -12,11 +12,13 @@ public enum LiftOffEnvelope { /** Weak or no limit moving off liquid near ground. */ LIMIT_NEAR_GROUND(0.42, 1.35, 6, false), // TODO: 0.385 / not jump on top of 1 high wall from water. /** Simple calm water surface. */ - LIMIT_LIQUID(0.1, 0.27, 3, false), // TODO: + LIMIT_LIQUID(0.1, 0.27, 3, false), // /** Flowing water / strong(-est) limit. */ // LIMIT_LIQUID_STRONG(...), // TODO - /** No jumping at all. */ - NO_JUMP(0.0, 0.0, 0, false); // TODO + /** No jumping at all (web). */ + NO_JUMP(0.0, 0.0, 0, false), + /** Like NO_JUMP, just to distinguish from being in web. */ + UNKNOWN(0.0, 0.0, 0, false); ; private double maxJumpGain;