mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-08-31 01:29:34 +02:00
Don't count the first tick for lag.
This commit is contained in:
parent
9e839b561e
commit
434eb68898
|
@ -344,9 +344,12 @@ public class TickTask implements Runnable {
|
|||
LogUtil.logSevere("[NoCheatPlus] System time ran backwards (" + timeLast + "->" + time + "), clear all data and history...");
|
||||
DataManager.clearData(CheckType.ALL);
|
||||
}
|
||||
else{
|
||||
else if (tick > 1){
|
||||
lastDur = time - timeLast;
|
||||
}
|
||||
else{
|
||||
lastDur = 50;
|
||||
}
|
||||
|
||||
// Update sums of sums of tick durations.
|
||||
if (tick > 0 && (tick % lagMaxTicks) == 0){
|
||||
|
@ -364,7 +367,7 @@ public class TickTask implements Runnable {
|
|||
tickDurations[0] = lastDur;
|
||||
|
||||
// Lag spikes counting. [Subject to adjustments!]
|
||||
if (lastDur > spikeDurations[0]){
|
||||
if (lastDur > spikeDurations[0] && tick > 1){
|
||||
spikes[0].add(time, 1f);
|
||||
for (int i = 1; i < spikeDurations.length; i++){
|
||||
if (lastDur > spikeDurations[i]){
|
||||
|
|
Loading…
Reference in New Issue
Block a user