From 4f26e5598cbf62eb5da4a0681260345b02380dfa Mon Sep 17 00:00:00 2001 From: jojoe77777 Date: Tue, 6 Sep 2016 13:43:21 +0100 Subject: [PATCH] Network: Fix crashes caused by AddEntityPacket --- src/pocketmine/network/protocol/AddEntityPacket.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/protocol/AddEntityPacket.php b/src/pocketmine/network/protocol/AddEntityPacket.php index f4e683578..b7a839d76 100644 --- a/src/pocketmine/network/protocol/AddEntityPacket.php +++ b/src/pocketmine/network/protocol/AddEntityPacket.php @@ -41,6 +41,7 @@ class AddEntityPacket extends DataPacket{ public $speedZ; public $yaw; public $pitch; + public $modifiers; public $metadata; public $links = []; @@ -58,8 +59,9 @@ class AddEntityPacket extends DataPacket{ $this->putFloat($this->speedX); $this->putFloat($this->speedY); $this->putFloat($this->speedZ); - $this->putFloat($this->yaw); - $this->putFloat($this->pitch); + $this->putFloat($this->yaw * (256/360)); + $this->putFloat($this->pitch * (256/360)); + $this->putInt($this->modifiers); $meta = Binary::writeMetadata($this->metadata); $this->put($meta); $this->putShort(count($this->links));