Made the movement speed check more reliable on high load servers.

This commit is contained in:
EvilSeph
2011-05-09 14:51:01 -04:00
parent 98633a9f16
commit 0faaf5af8a
2 changed files with 9 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
public OptionSet options;
public ColouredConsoleSender console;
public ConsoleReader reader;
public static int currentTick;
// Craftbukkit end
public MinecraftServer(OptionSet options) { // CraftBukkit - adds argument OptionSet
@@ -281,6 +282,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
j = 0L;
} else {
while (j > 50L) {
MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
j -= 50L;
this.h();
}