From 6e62b7ee1be1f03fc9a4ea40c7e68c6a2a02e73a Mon Sep 17 00:00:00 2001 From: asofold Date: Thu, 6 Dec 2012 02:11:38 +0100 Subject: [PATCH] Fix aspect of NoFall. 1. Add used PlayerLocation back to parked. 2. Also check for ladder and stairs. --- .../neatmonster/nocheatplus/checks/moving/MovingListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java b/src/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java index 83ead8e4..52b48c1a 100644 --- a/src/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java +++ b/src/fr/neatmonster/nocheatplus/checks/moving/MovingListener.java @@ -792,8 +792,9 @@ public class MovingListener extends CheckListener{ else moveInfo = parkedInfo.remove(parkedInfo.size() - 1); moveInfo.set(player, loc, null, cc.noFallyOnGround); // NOTE: No isIllegal check here. + final PlayerLocation pLoc = moveInfo.from; moveInfo.from.collectBlockFlags(cc.noFallyOnGround); - if (!moveInfo.from.isOnGround() && !moveInfo.from.isResetCond()){ + if (!pLoc.isOnGround() && !pLoc.isResetCond() && !pLoc.isAboveLadder() && !pLoc.isAboveStairs()){ // Likely a new style no-fall bypass (damage in mid-air). data.noFallVL += 1.0; if (noFall.executeActions(player, data.noFallVL, 1.0, cc.noFallActions, true) && data.setBack != null){ @@ -803,6 +804,7 @@ public class MovingListener extends CheckListener{ } } moveInfo.cleanup(); + parkedInfo.add(moveInfo); } final float fallDistance = player.getFallDistance(); final int damage = event.getDamage();