mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-11-09 20:20:11 +01:00
Put bunnyhopdelay back in (...).
This commit is contained in:
parent
bad6ee30a1
commit
791dca6048
@ -89,17 +89,17 @@ public class CreativeFly extends Check {
|
||||
// Finally, determine how far the player went beyond the set limits.
|
||||
double resultH = Math.max(0.0D, hDistance - data.horizontalFreedom - limitH);
|
||||
|
||||
// final boolean sprinting = player.isSprinting() && player.getFoodLevel() > 5;
|
||||
final boolean sprinting = player.isSprinting() && player.getFoodLevel() > 5;
|
||||
|
||||
// data.bunnyhopDelay--;
|
||||
data.bunnyhopDelay--;
|
||||
|
||||
// if (resultH > 0 && sprinting)
|
||||
// // Try to treat it as a the "bunnyhop" problem. The bunnyhop problem is that landing and immediately jumping
|
||||
// // again leads to a player moving almost twice as far in that step.
|
||||
// if (data.bunnyhopDelay <= 0 && resultH < 0.4D) {
|
||||
// data.bunnyhopDelay = 9;
|
||||
// resultH = 0D;
|
||||
// }
|
||||
if (resultH > 0 && sprinting)
|
||||
// Try to treat it as a the "bunnyhop" problem. The bunnyhop problem is that landing and immediately jumping
|
||||
// again leads to a player moving almost twice as far in that step.
|
||||
if (data.bunnyhopDelay <= 0 && resultH < 0.4D) {
|
||||
data.bunnyhopDelay = 9;
|
||||
resultH = 0D;
|
||||
}
|
||||
|
||||
resultH *= 100D;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class MovingData extends ACheckData {
|
||||
public double survivalFlyVL = 0D;
|
||||
|
||||
// Data shared between the fly checks.
|
||||
// public int bunnyhopDelay;
|
||||
public int bunnyhopDelay;
|
||||
public double horizontalBuffer;
|
||||
public double horizontalFreedom;
|
||||
public double horizontalVelocityCounter;
|
||||
@ -113,7 +113,7 @@ public class MovingData extends ACheckData {
|
||||
* Clear the data of the fly checks.
|
||||
*/
|
||||
public void clearFlyData() {
|
||||
// bunnyhopDelay = 0;
|
||||
bunnyhopDelay = 0;
|
||||
noFallFallDistance = 0D;
|
||||
survivalFlyJumpPhase = 0;
|
||||
setBack = null;
|
||||
|
@ -154,15 +154,15 @@ public class SurvivalFly extends Check {
|
||||
}
|
||||
}
|
||||
|
||||
// data.bunnyhopDelay--;
|
||||
data.bunnyhopDelay--;
|
||||
|
||||
// // Did he go too far?
|
||||
// if (hDistanceAboveLimit > 0 && sprinting)
|
||||
// // Try to treat it as a the "bunnyhop" problem.
|
||||
// if (data.bunnyhopDelay <= 0 && hDistanceAboveLimit > 0.05D && hDistanceAboveLimit < 0.28D) {
|
||||
// data.bunnyhopDelay = 9;
|
||||
// hDistanceAboveLimit = 0D;
|
||||
// }
|
||||
// Did he go too far?
|
||||
if (hDistanceAboveLimit > 0 && sprinting)
|
||||
// Try to treat it as a the "bunnyhop" problem.
|
||||
if (data.bunnyhopDelay <= 0 && hDistanceAboveLimit > 0.05D && hDistanceAboveLimit < 0.28D) {
|
||||
data.bunnyhopDelay = 9;
|
||||
hDistanceAboveLimit = 0D;
|
||||
}
|
||||
|
||||
if (hDistanceAboveLimit > 0D) {
|
||||
// Try to consume the "buffer".
|
||||
|
Loading…
Reference in New Issue
Block a user