diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java index 9dc6e582..dab97159 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java @@ -134,9 +134,9 @@ public class MovingData extends ACheckData { // Accounting info. // TODO: optimize later. - public final ActionFrequency hDistSum = new ActionFrequency(3, 333); +// public final ActionFrequency hDistSum = new ActionFrequency(3, 333); public final ActionFrequency vDistSum = new ActionFrequency(3, 333); - public final ActionFrequency hDistCount = new ActionFrequency(3, 333); +// public final ActionFrequency hDistCount = new ActionFrequency(3, 333); public final ActionFrequency vDistCount = new ActionFrequency(3, 333); // Locations shared between all checks. @@ -180,11 +180,14 @@ public class MovingData extends ACheckData { toWasReset = fromWasReset = false; // TODO: true maybe } + /** + * Clear accounting data. + */ public void clearAccounting() { final long now = System.currentTimeMillis(); - hDistSum.clear(now); +// hDistSum.clear(now); vDistSum.clear(now); - hDistCount.clear(now); +// hDistCount.clear(now); vDistCount.clear(now); } @@ -206,11 +209,21 @@ public class MovingData extends ACheckData { noFallSkipAirCheck = false; } + /** + * Just reset the "last locations" references. + * @param loc + */ public void resetPositions(final Location loc){ if (loc == null) resetPositions(Double.MAX_VALUE, 0, 0); else resetPositions(loc.getX(), loc.getY(), loc.getZ()); } + /** + * Just reset the "last locations" references. + * @param x + * @param y + * @param z + */ public void resetPositions(final double x, final double y, final double z) { fromX = toX = x; fromY = toY = y; diff --git a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java index 512cec54..0c6d97ba 100644 --- a/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java +++ b/NCPPlugin/src/main/java/fr/neatmonster/nocheatplus/checks/moving/SurvivalFly.java @@ -313,7 +313,7 @@ public class SurvivalFly extends Check { final String plYs = from.getY() == plY ? "" : ("|" + CheckUtils.fdec3.format(plY)); builder.append(player.getName() + " y: " + CheckUtils.fdec3.format(from.getY()) + plYs + (fromOnGround ? "(onground)" : "") + (data.noFallAssumeGround ? "(assumeonground)" : "") + " -> " + CheckUtils.fdec3.format(to.getY()) + (toOnGround ? "(onground)" : "") + "\n"); if (!resetFrom && !resetTo) { - if (cc.survivalFlyAccountingH && data.hDistCount.bucketScore(1) > 0 && data.hDistCount.bucketScore(2) > 0) builder.append(player.getName() + " hacc=" + data.hDistSum.bucketScore(2) + "->" + data.hDistSum.bucketScore(1) + "\n"); +// if (cc.survivalFlyAccountingH && data.hDistCount.bucketScore(1) > 0 && data.hDistCount.bucketScore(2) > 0) builder.append(player.getName() + " hacc=" + data.hDistSum.bucketScore(2) + "->" + data.hDistSum.bucketScore(1) + "\n"); if (cc.survivalFlyAccountingV && data.vDistCount.bucketScore(1) > 0 && data.vDistCount.bucketScore(2) > 0) builder.append(player.getName() + " vacc=" + data.vDistSum.bucketScore(2) + "->" + data.vDistSum.bucketScore(1) + "\n"); } if (player.isSleeping()) tags.add("sleeping");