mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
Do account for ms == 0.
This commit is contained in:
parent
fdb58eefca
commit
60114eb6eb
@ -236,7 +236,8 @@ public class TickTask implements Runnable {
|
||||
}
|
||||
final int tick = TickTask.tick;
|
||||
if (tick == 0) return 1f;
|
||||
final int add = (ms % 50) == 0 ? 0 : 1;
|
||||
final int add = ms > 0 && (ms % 50) == 0 ? 0 : 1;
|
||||
// TODO: Consider: Put "exact" block here, subtract a tick if appropriate?
|
||||
final int totalTicks = Math.min(tick, add + (int) (ms / 50));
|
||||
final int maxTick = Math.min(lagMaxTicks, totalTicks);
|
||||
long sum = tickDurations[maxTick - 1];
|
||||
|
Loading…
Reference in New Issue
Block a user