From b34d438ed9281b2e4fa4c09fa43e06e48816d9d7 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Wed, 2 Nov 2016 09:38:31 +0000 Subject: [PATCH] Fix AddPlayerPacket field ordering --- src/pocketmine/network/protocol/AddPlayerPacket.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/network/protocol/AddPlayerPacket.php b/src/pocketmine/network/protocol/AddPlayerPacket.php index 3c1ba0eb1..4eb043421 100644 --- a/src/pocketmine/network/protocol/AddPlayerPacket.php +++ b/src/pocketmine/network/protocol/AddPlayerPacket.php @@ -41,6 +41,7 @@ class AddPlayerPacket extends DataPacket{ public $speedY; public $speedZ; public $pitch; + public $headYaw; public $yaw; public $item; public $metadata = []; @@ -57,12 +58,10 @@ class AddPlayerPacket extends DataPacket{ $this->putEntityId($this->eid); //EntityRuntimeID $this->putVector3f($this->x, $this->y, $this->z); $this->putVector3f($this->speedX, $this->speedY, $this->speedZ); - //TODO: check these are in the right order - $this->putLFloat($this->yaw); - $this->putLFloat($this->yaw); //TODO headrot $this->putLFloat($this->pitch); + $this->putLFloat($this->headYaw ?? $this->yaw); + $this->putLFloat($this->yaw); $this->putSlot($this->item); - $meta = Binary::writeMetadata($this->metadata); $this->put($meta); }