From db7ac2bd8004a023d533637bf5708a29f9709b65 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 18 Jul 2014 02:00:23 +0200 Subject: [PATCH] Only count moving.morepackets on non-zero distances. --- .../neatmonster/nocheatplus/checks/moving/MovingListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 cd5e5f6d..6dae8c30 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 @@ -604,7 +604,9 @@ public class MovingListener extends CheckListener implements TickListener, IRemo if (newTo == null && cc.morePacketsCheck && !NCPExemptionManager.isExempted(player, CheckType.MOVING_MOREPACKETS) && !player.hasPermission(Permissions.MOVING_MOREPACKETS)) { // If it hasn't been stopped by any other check and is handled by the more packets check, execute it. // TODO: Still feed morepackets even if cancelled. - newTo = morePackets.check(player, pFrom, pTo, data, cc); + if (pFrom.manhattan(pTo) > 0.0) { + newTo = morePackets.check(player, pFrom, pTo, data, cc); + } } else { // Otherwise we need to clear their data. data.clearMorePacketsData();