Added horizontal velocity check and improving prediction

This commit is contained in:
Dawson
2022-08-15 20:07:33 -04:00
parent 6c1b512c18
commit 20978a30e1
5 changed files with 65 additions and 31 deletions
@@ -86,6 +86,19 @@ public class APlayer {
load();
}
private final Map<Class<? extends Check>, Check> checkCache = new HashMap<>();
public synchronized Check findCheck(Class<? extends Check> checkClass) {
return checkCache.computeIfAbsent(checkClass, key -> {
for (Check check : checks) {
if (check.getClass().equals(key)) {
return check;
}
}
return null;
});
}
private void load() {
synchronized (checks) {
for (CheckStatic check : Anticheat.INSTANCE.getCheckManager().getCheckClasses()) {