From 70188585371fcc9e527b93549ff4714f30a61dea Mon Sep 17 00:00:00 2001 From: Evenprime Date: Sun, 1 Jan 2012 18:18:34 +0100 Subject: [PATCH] Support the "rocket" command and similar stuff better --- .../bukkit/nocheat/checks/moving/MovingEventManager.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingEventManager.java b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingEventManager.java index 46b744c5..dbd5d5ff 100644 --- a/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingEventManager.java +++ b/src/cc/co/evenprime/bukkit/nocheat/checks/moving/MovingEventManager.java @@ -123,12 +123,16 @@ public class MovingEventManager extends EventManagerImpl { data.horizFreedom *= 0.90; } - if(data.vertVelocityCounter > 0) { + if(data.vertVelocity <= 0.1) { data.vertVelocityCounter--; + } + if(data.vertVelocityCounter > 0) { + data.vertFreedom += data.vertVelocity; data.vertVelocity *= 0.90; } else { - data.vertFreedom = 0; + // Counter has run out, now reduce the vert freedom over time + data.vertFreedom *= 0.90; } // Get some data that's needed from this event, to avoid passing the