mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
Keep players pitch/yaw on vehicle updates - fixes #1628
This commit is contained in:
parent
70e091b7d4
commit
450ed0d75c
1 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
From 0cb667d019381f677ba40181f34addd04c9dd8d0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 2 Nov 2018 23:16:29 -0400
|
||||
Subject: [PATCH] Keep players yaw/pitch on vehicle updates
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index e509be5622..e643709351 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -381,12 +381,12 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
Location curPos = this.getPlayer().getLocation(); // Spigot
|
||||
|
||||
entity.setLocation(d3, d4, d5, f, f1);
|
||||
- player.setLocation(d3, d4, d5, f, f1); // CraftBukkit
|
||||
+ player.setLocation(d3, d4, d5, player.yaw, player.pitch); // CraftBukkit // Paper
|
||||
boolean flag2 = worldserver.getCubes(entity, entity.getBoundingBox().shrink(0.0625D));
|
||||
|
||||
if (flag && (flag1 || !flag2)) {
|
||||
entity.setLocation(d0, d1, d2, f, f1);
|
||||
- player.setLocation(d0, d1, d2, f, f1); // CraftBukkit
|
||||
+ player.setLocation(d3, d4, d5, player.yaw, player.pitch); // CraftBukkit // Paper
|
||||
this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
|
||||
return;
|
||||
}
|
||||
--
|
||||
2.19.1
|
||||
|
Loading…
Reference in a new issue