summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorRigby <rigby@onarandombox.com>2011-08-13 03:36:43 +0100
committerEvilSeph <evilseph@gmail.com>2011-08-12 23:06:02 -0400
commita6c03ded28b65a936003c6f4391923da75c4f7cb (patch)
treebf6019e8d37fcf0699d930472a153a89f1625bad /src/main/java/net
parent748a6288e418ea8d52a287d55cc591ac1f0a536a (diff)
downloadcraftbukkit-a6c03ded28b65a936003c6f4391923da75c4f7cb.tar
craftbukkit-a6c03ded28b65a936003c6f4391923da75c4f7cb.tar.gz
craftbukkit-a6c03ded28b65a936003c6f4391923da75c4f7cb.tar.lz
craftbukkit-a6c03ded28b65a936003c6f4391923da75c4f7cb.tar.xz
craftbukkit-a6c03ded28b65a936003c6f4391923da75c4f7cb.zip
Movement handling cleanup.
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 6952416a..7724354c 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -308,17 +308,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
double d7 = d3 - this.player.locZ;
double d8 = d4 * d4 + d6 * d6 + d7 * d7;
- // CraftBukkit start - make the movement speed check behave properly under tick degradation.
- int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
-
- // Added this.m condition to solve this check being triggered by teleports
- if (d8 > 100.0D * (elapsedTicks <= 0 ? 1 : elapsedTicks) && this.checkMovement) {
- a.warning(this.player.name + " moved too quickly! Elapsed ticks: " + (elapsedTicks == 0 ? 1 : elapsedTicks) + ", Distance change: " + d8);
+ if (d8 > 200.0D && this.checkMovement) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
+ a.warning(this.player.name + " moved too quickly!");
this.disconnect("You moved too quickly :( (Hacking?)");
return;
}
- this.lastTick = MinecraftServer.currentTick;
- // CraftBukkit end
float f4 = 0.0625F;
boolean flag = worldserver.getEntities(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).size() == 0;