Skip to content

Commit

Permalink
Fix FlightA false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
tiredvekster committed Jul 8, 2024
1 parent 1ada6cd commit d929cfd
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import me.vekster.lightanticheat.player.cache.history.PlayerCacheHistory;
import me.vekster.lightanticheat.util.hook.plugin.FloodgateHook;
import me.vekster.lightanticheat.util.hook.plugin.simplehook.EnchantsSquaredHook;
import me.vekster.lightanticheat.util.hook.plugin.simplehook.ValhallaMMOHook;
import me.vekster.lightanticheat.util.precise.AccuracyUtil;
import me.vekster.lightanticheat.util.scheduler.Scheduler;
import me.vekster.lightanticheat.version.VerUtil;
Expand Down Expand Up @@ -260,6 +261,18 @@ else if (distanceHorizontal(event.getFrom(), event.getTo()) * 1.5 > distanceAbsV

if (AccuracyUtil.isViolationCancel(getCheckSetting(), buffer))
return;

if (ValhallaMMOHook.isPluginInstalled()) {
if (System.currentTimeMillis() - buffer.getLong("firstLevelFlagTime") > 8000) {
buffer.put("firstLevelFlagTime", System.currentTimeMillis());
buffer.put("firstLevelFlags", 0);
}

buffer.put("firstLevelFlags", buffer.getInt("firstLevelFlags") + 1);
if (buffer.getInt("firstLevelFlags") <= 9)
return;
}

if (System.currentTimeMillis() - buffer.getLong("lastGlidingLagPossibleTime") < 5 * 1000)
callViolationEventIfRepeat(player, lacPlayer, event, buffer, 500);
else
Expand Down

0 comments on commit d929cfd

Please sign in to comment.