summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-12-24 22:52:50 +1100
committermd_5 <git@md-5.net>2016-12-24 22:52:50 +1100
commit0fb3f8b47ae77239594509e8671519fe82189f2e (patch)
tree289086b336c11462e16d033cf94b4714b3a2900f /nms-patches
parent96f03d906578da759c1cf1d4caff7e7cd49cf18c (diff)
downloadcraftbukkit-0fb3f8b47ae77239594509e8671519fe82189f2e.tar
craftbukkit-0fb3f8b47ae77239594509e8671519fe82189f2e.tar.gz
craftbukkit-0fb3f8b47ae77239594509e8671519fe82189f2e.tar.lz
craftbukkit-0fb3f8b47ae77239594509e8671519fe82189f2e.tar.xz
craftbukkit-0fb3f8b47ae77239594509e8671519fe82189f2e.zip
Correct some code.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/PlayerConnection.patch9
1 files changed, 9 insertions, 0 deletions
diff --git a/nms-patches/PlayerConnection.patch b/nms-patches/PlayerConnection.patch
index b208f9fb..65c8206f 100644
--- a/nms-patches/PlayerConnection.patch
+++ b/nms-patches/PlayerConnection.patch
@@ -169,6 +169,15 @@
}
public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) {
+@@ -158,7 +257,7 @@
+ }
+
+ private static boolean b(PacketPlayInFlying packetplayinflying) {
+- return Doubles.isFinite(packetplayinflying.a(0.0D)) && Doubles.isFinite(packetplayinflying.b(0.0D)) && Doubles.isFinite(packetplayinflying.c(0.0D)) && Floats.isFinite(packetplayinflying.b(0.0F)) && Floats.isFinite(packetplayinflying.a(0.0F)) ? false : Math.abs(packetplayinflying.a(0.0D)) <= 3.0E7D && Math.abs(packetplayinflying.c(0.0D)) <= 3.0E7D;
++ return !Doubles.isFinite(packetplayinflying.a(0.0D)) || !Doubles.isFinite(packetplayinflying.b(0.0D)) || !Doubles.isFinite(packetplayinflying.c(0.0D)) || !Floats.isFinite(packetplayinflying.b(0.0F)) || !Floats.isFinite(packetplayinflying.a(0.0F)) || Math.abs(packetplayinflying.a(0.0D)) >= 3.0E7D || Math.abs(packetplayinflying.b(0.0D)) >= 3.0E7D || Math.abs(packetplayinflying.c(0.0D)) >= 3.0E7D;
+ }
+
+ private static boolean b(PacketPlayInVehicleMove packetplayinvehiclemove) {
@@ -188,7 +287,34 @@
double d9 = entity.motX * entity.motX + entity.motY * entity.motY + entity.motZ * entity.motZ;
double d10 = d6 * d6 + d7 * d7 + d8 * d8;