2014-01-22 09:19:39 +01:00
|
|
|
From 00c63d4d0d013c836c4ab73c88cfb756ed7b4aa6 Mon Sep 17 00:00:00 2001
|
2013-10-06 08:37:54 +02: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
|
2013-12-21 09:13:39 +01:00
|
|
|
index 6e54ad1..e88adfa 100644
|
2013-10-06 08:37:54 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
2013-12-21 09:13:39 +01:00
|
|
|
@@ -105,6 +105,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 08:41:06 +02:00
|
|
|
private float lastPitch = Float.MAX_VALUE;
|
|
|
|
private float lastYaw = Float.MAX_VALUE;
|
|
|
|
private boolean justTeleported = false;
|
|
|
|
+ private boolean hasMoved; // Spigot
|
|
|
|
|
2013-12-01 04:40:53 +01:00
|
|
|
// For the PacketPlayOutBlockPlace hack :(
|
2013-10-06 08:41:06 +02:00
|
|
|
Long lastPacket;
|
2013-12-21 09:13:39 +01:00
|
|
|
@@ -222,7 +223,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 08:37:54 +02:00
|
|
|
this.lastPitch = to.getPitch();
|
|
|
|
|
|
|
|
// Skip the first time we do this
|
|
|
|
- if (from.getX() != Double.MAX_VALUE) {
|
2013-10-06 08:41:06 +02:00
|
|
|
+ if (hasMoved) { // Spigot - Better Check!
|
2013-10-06 08:37:54 +02:00
|
|
|
PlayerMoveEvent event = new PlayerMoveEvent(player, from, to);
|
|
|
|
this.server.getPluginManager().callEvent(event);
|
|
|
|
|
2013-12-21 09:13:39 +01:00
|
|
|
@@ -246,7 +247,7 @@ public class PlayerConnection implements PacketPlayInListener {
|
2013-10-06 08:41:06 +02:00
|
|
|
this.justTeleported = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
- }
|
|
|
|
+ } else { hasMoved = true; } // Spigot - Better Check!
|
|
|
|
}
|
|
|
|
|
2013-12-01 04:40:53 +01:00
|
|
|
if (Double.isNaN(packetplayinflying.x) || Double.isNaN(packetplayinflying.y) || Double.isNaN(packetplayinflying.z) || Double.isNaN(packetplayinflying.stance)) {
|
2013-10-06 08:37:54 +02:00
|
|
|
--
|
2013-12-01 04:40:53 +01:00
|
|
|
1.8.3.2
|
2013-10-06 08:37:54 +02:00
|
|
|
|