mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-18 18:01:17 +02:00
Only count moving.morepackets on non-zero distances.
This commit is contained in:
parent
f79c89b45a
commit
db7ac2bd80
@ -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 (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.
|
// 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.
|
// TODO: Still feed morepackets even if cancelled.
|
||||||
|
if (pFrom.manhattan(pTo) > 0.0) {
|
||||||
newTo = morePackets.check(player, pFrom, pTo, data, cc);
|
newTo = morePackets.check(player, pFrom, pTo, data, cc);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Otherwise we need to clear their data.
|
// Otherwise we need to clear their data.
|
||||||
data.clearMorePacketsData();
|
data.clearMorePacketsData();
|
||||||
|
Loading…
Reference in New Issue
Block a user