mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fix #167, vastly improved aimbot check (experimental)
This commit is contained in:
1 parent
e2d0fbda18
commit
78ae04a2a8
12 files changed
+110
-70
No files matched your search
@@ -78,18 +78,12 @@ public final class BadPacketsCheck {
|
||||
maxDistance *= 1.5D;
|
||||
}
|
||||
|
||||
final boolean hasNewLocation = packet.getBooleans().read(0);
|
||||
if (distance > maxDistance) {
|
||||
flag(player, event,
|
||||
"moved too far between packets (distance="
|
||||
+ new BigDecimal(distance).setScale(1, RoundingMode.HALF_UP) + ", max=" + maxDistance
|
||||
+ ", at=" + movementManager.airTicks + ")");
|
||||
return;
|
||||
} else if (distance < 1E-10 && !hasNewLocation) {
|
||||
// TODO this gives false positives when teleporting
|
||||
// Only found this in 1.8.8 though
|
||||
// flag(player, event, "sent the same packet twice");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user