From 530f85c03c9b199034be7311a857dc07d3940aa6 Mon Sep 17 00:00:00 2001 From: asofold Date: Fri, 4 Jan 2013 16:51:42 +0100 Subject: [PATCH] Details about morepackets set-back. --- .../neatmonster/nocheatplus/checks/moving/MorePackets.java | 7 +++++-- .../nocheatplus/checks/moving/MorePacketsVehicle.java | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java index de7ca8ae..f3f84e7d 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePackets.java @@ -67,8 +67,11 @@ public class MorePackets extends Check { Location newTo = null; - if (data.morePacketsSetback == null) - data.morePacketsSetback = from.getLocation(); + if (data.morePacketsSetback == null){ + // TODO: Check if other set-back is appropriate or if to set on other events. + if (data.setBack != null) data.morePacketsSetback = data.setBack.clone(); + else data.morePacketsSetback = from.getLocation(); + } // Take a packet from the buffer. data.morePacketsBuffer--; diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java index 426706cc..63edc42f 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MorePacketsVehicle.java @@ -67,8 +67,10 @@ public class MorePacketsVehicle extends Check { Location newTo = null; - if (data.morePacketsVehicleSetback == null) - data.morePacketsVehicleSetback = from; + if (data.morePacketsVehicleSetback == null){ + // TODO: Check if other set-back is appropriate or if to set on other events. + data.morePacketsVehicleSetback = from; + } // Take a packet from the buffer. data.morePacketsVehicleBuffer--;