2014-01-31 20:42:29 +00:00
|
|
|
From 35c118d7278bdca1671c45a5e8f6ab1a99ad5ee3 Mon Sep 17 00:00:00 2001
|
2013-10-06 06:37:54 +00:00
|
|
|
From: md_5 <md_5@live.com.au>
|
|
|
|
Date: Sun, 6 Oct 2013 17:36:28 +1100
|
|
|
|
Subject: [PATCH] Don't Special Case X Move Value
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2014-01-31 20:42:29 +00:00
|
|
|
index 0c85c57..0cf3c98 100644
|
2013-10-06 06:37:54 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2013-12-21 08:13:39 +00:00
|
|
|
@@ -105,6 +105,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 06:41:06 +00:00
|
|
|
private float lastPitch = Float.MAX_VALUE;
|
|
|
|
private float lastYaw = Float.MAX_VALUE;
|
|
|
|
private boolean justTeleported = false;
|
|
|
|
+ private boolean hasMoved; // Spigot
|
|
|
|
|
2013-12-01 03:40:53 +00:00
|
|
|
// For the PacketPlayOutBlockPlace hack :(
|
2013-10-06 06:41:06 +00:00
|
|
|
Long lastPacket;
|
2014-01-31 20:42:29 +00:00
|
|
|
@@ -229,7 +230,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 06:37:54 +00:00
|
|
|
this.lastPitch = to.getPitch();
|
|
|
|
|
|
|
|
// Skip the first time we do this
|
|
|
|
- if (from.getX() != Double.MAX_VALUE) {
|
2013-10-06 06:41:06 +00:00
|
|
|
+ if (hasMoved) { // Spigot - Better Check!
|
2013-10-06 06:37:54 +00:00
|
|
|
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
|
|
|
this.server.getPluginManager().callEvent(event);
|
|
|
|
|
2014-01-31 20:42:29 +00:00
|
|
|
@@ -253,7 +254,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 06:41:06 +00:00
|
|
|
this.justTeleported = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
- }
|
|
|
|
+ } else { hasMoved = true; } // Spigot - Better Check!
|
|
|
|
}
|
|
|
|
|
2014-01-31 20:42:29 +00:00
|
|
|
if (this.checkMovement && !this.player.dead) {
|
2013-10-06 06:37:54 +00:00
|
|
|
--
|
2014-01-31 20:42:29 +00:00
|
|
|
1.8.4.msysgit.0
|
2013-10-06 06:37:54 +00:00
|
|
|
|