mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-09-05 11:41:10 +02:00
Make TickTask.getLag more precise.
This commit is contained in:
parent
9b75979dee
commit
67b3b9ea00
|
@ -236,8 +236,8 @@ public class TickTask implements Runnable {
|
|||
}
|
||||
final int tick = TickTask.tick;
|
||||
if (tick == 0) return 1f;
|
||||
|
||||
final int totalTicks = Math.min(tick, 1 + (int) (ms / 50));
|
||||
final int add = (ms % 50) == 0 ? 0 : 1;
|
||||
final int totalTicks = Math.min(tick, add + (int) (ms / 50));
|
||||
final int maxTick = Math.min(lagMaxTicks, totalTicks);
|
||||
long sum = tickDurations[maxTick - 1];
|
||||
long covered = maxTick * 50;
|
||||
|
|
Loading…
Reference in New Issue
Block a user