Skip to content

Commit

Permalink
Merge pull request #1727 from ManInMyVan/negativetimer-setbacks
Browse files Browse the repository at this point in the history
allow setbacks in NegativeTimer
  • Loading branch information
SamB440 authored Nov 1, 2024
2 parents 30c2d36 + 262de24 commit e829c25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ac.grim.grimac.utils.anticheat.update.PredictionComplete;
import com.github.retrooper.packetevents.event.PacketReceiveEvent;

@CheckData(name = "NegativeTimer", configName = "NegativeTimer", setback = 10, experimental = true)
@CheckData(name = "NegativeTimer", configName = "NegativeTimer", setback = -1, experimental = true)
public class NegativeTimerCheck extends TimerCheck implements PostPredictionCheck {

public NegativeTimerCheck(GrimPlayer player) {
Expand All @@ -24,7 +24,7 @@ public void onPredictionComplete(final PredictionComplete predictionComplete) {

if (timerBalanceRealTime < lastMovementPlayerClock - clockDrift) {
int lostMS = (int) ((System.nanoTime() - timerBalanceRealTime) / 1e6);
flagAndAlert("-" + lostMS);
if (flagAndAlert("-" + lostMS)) setbackIfAboveSetbackVL();
timerBalanceRealTime += 50e6;
}
}
Expand Down

0 comments on commit e829c25

Please sign in to comment.