summaryrefslogtreecommitdiffstats
path: root/nms-patches/PlayerConnection.patch
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2016-03-03 11:15:04 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2016-03-03 11:15:04 +0000
commit31caee5a947d439f886602469c855ed56c5a1c48 (patch)
tree6cedf75fd1dd7c26fbdaccfc6132f4c44da6e31a /nms-patches/PlayerConnection.patch
parent23ad72b4c8b46883092f3ef1280093bfa82695c6 (diff)
downloadcraftbukkit-31caee5a947d439f886602469c855ed56c5a1c48.tar
craftbukkit-31caee5a947d439f886602469c855ed56c5a1c48.tar.gz
craftbukkit-31caee5a947d439f886602469c855ed56c5a1c48.tar.lz
craftbukkit-31caee5a947d439f886602469c855ed56c5a1c48.tar.xz
craftbukkit-31caee5a947d439f886602469c855ed56c5a1c48.zip
SPIGOT-1646: Capture the previous location earlier
Diffstat (limited to 'nms-patches/PlayerConnection.patch')
-rw-r--r--nms-patches/PlayerConnection.patch26
1 files changed, 10 insertions, 16 deletions
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch
index bb668cc2..26a609ca 100644
--- a/nms-patches/PlayerConnection.patch
+++ b/nms-patches/PlayerConnection.patch
@@ -235,7 +235,7 @@
this.minecraftServer.getPlayerList().d(this.player);
this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
this.D = d11 >= -0.03125D && !this.minecraftServer.getAllowFlight() && !worldserver.d(entity.getBoundingBox().g(0.0625D).a(0.0D, -0.55D, 0.0D));
-@@ -273,12 +422,13 @@
+@@ -273,13 +422,21 @@
this.A = this.e;
this.a(this.teleportPos.x, this.teleportPos.y, this.teleportPos.z, this.player.yaw, this.player.pitch);
}
@@ -248,9 +248,17 @@
this.minecraftServer.getPlayerList().d(this.player);
+ this.allowedPlayerTicks = 20; // CraftBukkit
} else {
++ // CraftBukkit - Make sure the move is valid but then reset it for plugins to modify
++ double prevX = player.locX;
++ double prevY = player.locY;
++ double prevZ = player.locZ;
++ float prevYaw = player.yaw;
++ float prevPitch = player.pitch;
++ // CraftBukkit end
double d0 = this.player.locX;
double d1 = this.player.locY;
-@@ -298,15 +448,32 @@
+ double d2 = this.player.locZ;
+@@ -298,15 +455,32 @@
++this.F;
int i = this.F - this.G;
@@ -285,20 +293,6 @@
PlayerConnection.LOGGER.warn(this.player.getName() + " moved too quickly! " + d7 + "," + d8 + "," + d9);
this.a(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch);
return;
-@@ -341,6 +508,13 @@
- PlayerConnection.LOGGER.warn(this.player.getName() + " moved wrongly!");
- }
-
-+ // CraftBukkit - Make sure the move is valid but then reset it for plugins to modify
-+ double prevX = player.locX;
-+ double prevY = player.locY;
-+ double prevZ = player.locZ;
-+ float prevYaw = player.yaw;
-+ float prevPitch = player.pitch;
-+ // CraftBukkit end
- this.player.setLocation(d4, d5, d6, f, f1);
- this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
- if (!this.player.noclip && !this.player.isSleeping()) {
@@ -352,6 +526,69 @@
}
}