mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 22:14:49 +00:00
Fix riptide false positives, improved performance
This commit is contained in:
1 parent
bd1db83a98
commit
7e1f0d83ce
7 files changed
+29
-76
No files matched your search
@@ -93,6 +93,8 @@ public class MovementManager {
|
||||
public boolean hasIncreasingEffect = false;
|
||||
// If the player had a speed increasing effect previous tick
|
||||
public boolean hadIncreasingEffect = false;
|
||||
// Riptiding ticks
|
||||
public int riptideTicks;
|
||||
// Time of last update
|
||||
public long lastUpdate;
|
||||
|
||||
@@ -182,6 +184,17 @@ public class MovementManager {
|
||||
this.nearLiquidTicks = 0;
|
||||
}
|
||||
|
||||
if (VersionUtil.CURRENT_VERSION.isAtLeast(MinecraftVersion.AQUATIC_UPDATE)) {
|
||||
if (player.isRiptiding()) {
|
||||
this.riptideTicks = 30;
|
||||
} else {
|
||||
if (this.riptideTicks > 0)
|
||||
this.riptideTicks--;
|
||||
else
|
||||
this.riptideTicks = 0;
|
||||
}
|
||||
}
|
||||
|
||||
this.hadSpeedEffect = this.hasSpeedEffect;
|
||||
this.hasSpeedEffect = player.hasPotionEffect(PotionEffectType.SPEED);
|
||||
|
||||
|
||||
Reference in new issue
Block a user