mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
Removed unused timer check
This commit is contained in:
1 parent
91f5fcd31c
commit
76c595e255
4 files changed
+4
-36
No files matched your search
@@ -372,27 +372,6 @@ public class Backend {
|
||||
return PASS;
|
||||
}
|
||||
|
||||
public CheckResult checkTimer(Player player) {
|
||||
UUID uuid = player.getUniqueId();
|
||||
int step = 1;
|
||||
if (steps.containsKey(uuid)) {
|
||||
step = steps.get(uuid) + 1;
|
||||
}
|
||||
if (step == 1) {
|
||||
stepTime.put(uuid, System.currentTimeMillis());
|
||||
}
|
||||
incrementOld(player, steps, step);
|
||||
if (step == magic.TIMER_STEP_CHECK()) {
|
||||
long time = System.currentTimeMillis() - stepTime.get(uuid);
|
||||
steps.put(uuid, 0);
|
||||
if (time < magic.TIMER_TIMEMIN()) {
|
||||
return new CheckResult(CheckResult.Result.FAILED, "tried to alter their timer, took " + step
|
||||
+ " steps in " + time + " ms (min = " + magic.TIMER_TIMEMIN() + " ms)");
|
||||
}
|
||||
}
|
||||
return PASS;
|
||||
}
|
||||
|
||||
public void logAscension(Player player, double y1, double y2) {
|
||||
UUID name = player.getUniqueId();
|
||||
if (y1 < y2 && !isAscending.contains(name)) {
|
||||
@@ -414,6 +393,7 @@ public class Backend {
|
||||
&& !justBroke(player) && !Utilities.isClimbableBlock(player.getLocation().getBlock())
|
||||
&& !player.isInsideVehicle() && !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1, 0).getBlock())
|
||||
&& !YAxisCheck.isMoveUpBlock(player.getLocation().add(0, -1.5, 0).getBlock())) {
|
||||
// TODO isMoveUpBlock does not seem to be a success with stairs
|
||||
if (y1 < y2) {
|
||||
if (!block.getRelative(BlockFace.NORTH).isLiquid() && !block.getRelative(BlockFace.SOUTH).isLiquid()
|
||||
&& !block.getRelative(BlockFace.EAST).isLiquid()
|
||||
|
||||
@@ -80,7 +80,9 @@ public class GlideCheck {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// TODO more sophisticated check
|
||||
if (fallDistance > LAST_FALL_DISTANCE.get(player.getUniqueId()) && !player.isOnGround()) {
|
||||
// TODO check gravity
|
||||
}
|
||||
}
|
||||
LAST_DIFFERENCE.put(player.getUniqueId(), distance.getYDifference());
|
||||
LAST_FALL_DISTANCE.put(player.getUniqueId(), player.getFallDistance());
|
||||
|
||||
@@ -350,14 +350,6 @@ public interface Magic {
|
||||
* The minimum time it should have taken for the player to click X times; Type=INTEGER; Leniency=INCREASE.
|
||||
*/
|
||||
public int INVENTORY_TIMEMIN();
|
||||
/**
|
||||
* The number of steps we should wait before checking if the player has used timer cheating; Type=INTEGER; Leniency=INCREASE.
|
||||
*/
|
||||
public int TIMER_STEP_CHECK();
|
||||
/**
|
||||
* The minimum time it should have taken for the player to travel X steps; Type=SYSTEM; Leniency=DECREASE.
|
||||
*/
|
||||
public int TIMER_TIMEMIN();
|
||||
/**
|
||||
* Minimum travel distance for move to be considered a teleport and subsequently be ignored; Type=INTEGER, Leniency=INCREASE.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user