diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java index d977b7ce..01c89f43 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/fight/FightListener.java @@ -231,7 +231,8 @@ public class FightListener extends CheckListener implements JoinLeaveListener{ final double hDist = TrigUtil.distance(loc.getX(), loc.getZ(), mData.fromX, mData.fromZ) ; if (hDist >= 0.23 && mData.sfHorizontalBuffer > 0.5 && MovingListener.shouldCheckSurvivalFly(player, mData, MovingConfig.getConfig(player))){ // Allow extra consumption with buffer. - mData.sfHBufExtra = 7; + // TODO: Add to normal buffer or add velocity entry. +// mData.sfHBufExtra = 7; if (cc.debug && BuildParameters.debugLevel > 0){ System.out.println(player.getName() + " attacks, hDist to last from: " + hDist + " | targetdist=" + TrigUtil.distance(loc.getX(), loc.getZ(), targetLoc.getX(), targetLoc.getZ()) + " | sprinting=" + player.isSprinting() + " | food=" + player.getFoodLevel() +" | hbuf=" + mData.sfHorizontalBuffer); } diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java index 633ec2d7..61a8deab 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/MovingData.java @@ -503,11 +503,12 @@ public class MovingData extends ACheckData { */ public void velocityTick(){ // Decrease counts for active. + // TODO: Actual friction. Could pass as an argument (special value for not to be used). // TODO: Consider removing already invalidated here. for (final Velocity vel : hVelActive){ vel.valCount --; vel.sum += vel.value; - vel.value *= 0.93; // TODO: Actual friction. + vel.value *= 0.93; // vel.frictionFactor; // (Altered entries should be kept, since they get used right away.) } // Decrease counts for queued. diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Velocity.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Velocity.java index 4e2a56e1..4ee29c84 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Velocity.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/checks/moving/Velocity.java @@ -10,17 +10,22 @@ import fr.neatmonster.nocheatplus.utilities.TickTask; */ public class Velocity { +// private static final double defaultFrictionFactor = 0.93; + /** Tick at which velocity got added. */ public final int tick; /** The amount of velocity, decreasing with use. */ public double value; + +// /** Factor for decrease of value */ +// public double frictionFactor = defaultFrictionFactor; + /** "Some sum" for general purpose. *