mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Fixe false positive when coming out of water
This commit is contained in:
1 parent
f4ca2ea8bf
commit
fc006c39f2
1 file changed
+4
@@ -114,6 +114,10 @@ public class SpeedCheck {
|
||||
// TODO better way for this
|
||||
if (player.isBlocking() && movementManager.airTicks > 2)
|
||||
predict *= 0.8D;
|
||||
// Fixes false positive when coming out of water
|
||||
if (movementManager.nearLiquidTicks >= 7 && movementManager.airTicks >= 14
|
||||
&& movementManager.motionY < -0.18 && movementManager.motionY > -0.182)
|
||||
predict += Math.abs(movementManager.motionY);
|
||||
|
||||
if (distanceXZ - predict > limit) {
|
||||
return new CheckResult(CheckResult.Result.FAILED, "moved too fast in air (speed=" + distanceXZ
|
||||
|
||||
Reference in new issue
Block a user