From 6a7f14077c439f831524102b1c4e7f0060edc43b Mon Sep 17 00:00:00 2001 From: asofold Date: Sun, 12 Aug 2012 08:22:35 +0200 Subject: [PATCH] Add comments ,set noFallY more often. --- .../nocheatplus/checks/moving/NoFall.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/fr/neatmonster/nocheatplus/checks/moving/NoFall.java b/src/fr/neatmonster/nocheatplus/checks/moving/NoFall.java index 909d7a4d..ce4d7938 100644 --- a/src/fr/neatmonster/nocheatplus/checks/moving/NoFall.java +++ b/src/fr/neatmonster/nocheatplus/checks/moving/NoFall.java @@ -56,15 +56,26 @@ public class NoFall extends Check { // Emergency fix attempt: data.clearFlyData(); player.setFallDistance(0.0f); + data.noFallY = to.getY(); return; } // If the player has just started falling, is falling into a liquid, in web or is on a ladder. - if (to.isInLiquid() || to.isInWeb() || to.isOnLadder()) + if (to.isInLiquid() || to.isInWeb() || to.isOnLadder()){ // Reset his fall distance. data.noFallFallDistance = 0D; + data.noFallY = to.getY(); + } + // data.noFallFallDistance = data.noFallFallDistance; + + /* + * TODO: This might actually (probably) calculated before ordinary fall damage can be dealt (!) + * So NoCheatPlus takes over ALL fall damage dealing, currently :) - + * This should not lead to alerts and trigger normal fall damage, probably, + * in case it is not cheating (how to distinguish...). + */ // If the player just touched the ground for the server, but no for the client. if (!data.noFallWasOnGroundServer && data.noFallOnGroundServer