mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
Tried to reduce Glide false positives. Let's see if it works...
This commit is contained in:
1 parent
2d3ea4d889
commit
11cea04d0c
1 file changed
+2
-2
@@ -36,13 +36,13 @@ public class GlideCheck {
|
|||||||
{
|
{
|
||||||
if(math <= lastYDelta.get(name) && !(player.getEyeLocation().getBlock().getType() == Material.LADDER)
|
if(math <= lastYDelta.get(name) && !(player.getEyeLocation().getBlock().getType() == Material.LADDER)
|
||||||
&& !Utilities.isInWater(player) && !Utilities.isInWeb(player)
|
&& !Utilities.isInWater(player) && !Utilities.isInWeb(player)
|
||||||
&& Utilities.cantStandAt(player.getLocation().getBlock()))
|
&& Utilities.cantStandAt(player.getLocation().getBlock()) && !Utilities.cantStandAtSingle(player.getLocation().getBlock()))
|
||||||
{
|
{
|
||||||
if(!glideBuffer.containsKey(name))
|
if(!glideBuffer.containsKey(name))
|
||||||
glideBuffer.put(name, 0);
|
glideBuffer.put(name, 0);
|
||||||
int currentBuffer = glideBuffer.get(name);
|
int currentBuffer = glideBuffer.get(name);
|
||||||
glideBuffer.put(name, currentBuffer + 1);
|
glideBuffer.put(name, currentBuffer + 1);
|
||||||
if(currentBuffer >= AntiCheat.getManager().getBackend().getMagic().GLIDE_LIMIT())
|
if(currentBuffer + 1 >= AntiCheat.getManager().getBackend().getMagic().GLIDE_LIMIT())
|
||||||
{
|
{
|
||||||
double fallDist = distanceToFall(player.getLocation());
|
double fallDist = distanceToFall(player.getLocation());
|
||||||
player.teleport(player.getLocation().add(0, -fallDist, 0));
|
player.teleport(player.getLocation().add(0, -fallDist, 0));
|
||||||
|
|||||||
Reference in new issue
Block a user