diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-05-23 03:36:13 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-05-23 03:57:01 -0400 |
commit | 3cd135b08d503b367e42f1637b8c182ad75c7981 (patch) | |
tree | 7a34bac64633e0488c22943c559edbb8de73314a /src/main/java/net/minecraft | |
parent | 949634ad67595829ca8d205aa7978bed29bbf00b (diff) | |
download | craftbukkit-3cd135b08d503b367e42f1637b8c182ad75c7981.tar craftbukkit-3cd135b08d503b367e42f1637b8c182ad75c7981.tar.gz craftbukkit-3cd135b08d503b367e42f1637b8c182ad75c7981.tar.lz craftbukkit-3cd135b08d503b367e42f1637b8c182ad75c7981.tar.xz craftbukkit-3cd135b08d503b367e42f1637b8c182ad75c7981.zip |
Possible fix for teleports triggering 'moved too quickly' check.
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 98b6d29c..b6fa2d15 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -280,7 +280,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener { // CraftBukkit start - make the movement speed check behave properly under tick degradation. int elapsedTicks = MinecraftServer.currentTick - this.lastTick; - if (d8 > 100.0D * (elapsedTicks <= 0 ? 1 : elapsedTicks)) { + // Added this.m condition to solve this check being triggered by teleports + if (d8 > 100.0D * (elapsedTicks <= 0 ? 1 : elapsedTicks) && this.m) { a.warning(this.player.name + " moved too quickly! Elapsed ticks: " + (elapsedTicks == 0 ? 1 : elapsedTicks) + ", Distance change: " + d8); this.disconnect("You moved too quickly :( (Hacking?)"); return; |