From c08a670288f224e72d73a088bcec205c76a167f5 Mon Sep 17 00:00:00 2001 From: asofold Date: Tue, 17 Nov 2015 01:34:57 +0100 Subject: [PATCH] Add oddLiquid case for moving out of water with velocity. --- .../nocheatplus/checks/moving/SurvivalFly.java | 16 ++++++++++++---- 1 file changed, 12 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 bda13752..d9a45f4c 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 @@ -1115,10 +1115,18 @@ public class SurvivalFly extends Check { && fallingEnvelope(yDistance, data.lastYDist, data.lastFrictionVertical, GRAVITY_ODD / 2.0) // Falling slightly too slow. || yDistDiffEx > 0.0 && data.liftOffEnvelope == LiftOffEnvelope.LIMIT_LIQUID - && data.lastYDist != Double.MAX_VALUE && data.lastYDist > -2.0 * GRAVITY_MAX - GRAVITY_ODD - && yDistance < data.lastYDist && data.lastYDist - yDistance < GRAVITY_MAX - && data.lastYDist - yDistance > GRAVITY_MIN / 4.0 - // Falling too slow around 0 yDistance. + && + ( + // Falling too slow around 0 yDistance. + data.lastYDist != Double.MAX_VALUE && data.lastYDist > -2.0 * GRAVITY_MAX - GRAVITY_ODD + && yDistance < data.lastYDist && data.lastYDist - yDistance < GRAVITY_MAX + && data.lastYDist - yDistance > GRAVITY_MIN / 4.0 + // Moving out of liquid with velocity. + || data.lastYDist != Double.MAX_VALUE && data.lastYDist > 0.0 + && yDistance < data.lastYDist && yDistance > 0.0 && data.sfJumpPhase == 1 + && data.lastYDist - yDistance > GRAVITY_MAX + && yDistDiffEx < GRAVITY_MAX + GRAVITY_SPAN && data.isVelocityJumpPhase() + ) ); }