diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java index f39c8ab8..ca1cc8e8 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java @@ -1003,7 +1003,7 @@ public class MovingListener extends CheckListener implements TickListener, IRemo double newVal = velocity.getY(); boolean used = false; - if (newVal >= 0D) { + if (newVal >= 0D) { // TODO: Just >, not >=. used = true; if (data.verticalFreedom <= 0.001 && data.verticalVelocityCounter >= 0) { data.verticalVelocity = 0; 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 22e35e54..6f5e5398 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 @@ -534,12 +534,6 @@ public class SurvivalFly extends Check { else { hAllowedDistance = walkSpeed * modSprint * cc.survivalFlySprintingSpeed / 100D; } - - // Speeding bypass permission (can be combined with other bypasses). - // TODO: How exactly to bring it on finally. - if (checkPermissions && player.hasPermission(Permissions.MOVING_SURVIVALFLY_SPEEDING)) { - hAllowedDistance *= cc.survivalFlySpeedingSpeed / 100D; - } } // Account for flowing liquids (only if needed). @@ -550,6 +544,7 @@ public class SurvivalFly extends Check { } // Short cut. + // TODO: Check if a) early return makes sense and b) do it ofr all following parts. if (hDistance <= hAllowedDistance && !cc.debug) { // Shortcut for debug disabled. return hAllowedDistance; @@ -566,6 +561,11 @@ public class SurvivalFly extends Check { hAllowedDistance *= 1.0D + 0.2D * (speedAmplifier + 1); } + // Speeding bypass permission (can be combined with other bypasses). + if (checkPermissions && player.hasPermission(Permissions.MOVING_SURVIVALFLY_SPEEDING)) { + hAllowedDistance *= cc.survivalFlySpeedingSpeed / 100D; + } + return hAllowedDistance; } @@ -999,6 +999,7 @@ public class SurvivalFly extends Check { // if (vDistanceAboveLimit > 0) tags.add("vclimb"); final double jumpHeight = 1.35 + (data.jumpAmplifier > 0 ? (0.6 + data.jumpAmplifier - 1.0) : 0.0); // TODO: ladders are ground ! + // TODO: yDistance < 0.0 ? if (yDistance > climbSpeed && !from.isOnGround(jumpHeight, 0D, 0D, BlockProperties.F_CLIMBABLE)) { // Ignore ladders. TODO: Check for false positives... tags.add("climbspeed");