From c2d760e6d93d9dad6ac54961114cd74d6c3db1fb Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Wed, 25 Jun 2014 23:09:22 +0200 Subject: [PATCH] Added RotateHeadPacket --- src/pocketmine/Player.php | 1 + src/pocketmine/network/protocol/RotateHeadPacket.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 1693e0310..947f3af37 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1283,6 +1283,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $this->server->getLogger()->warning($this->username." moved too quickly!"); } }else{*/ + if(!$this->setPositionAndRotation($newPos, $packet->yaw, $packet->pitch)){ $pk = new MovePlayerPacket(); $pk->eid = 0; diff --git a/src/pocketmine/network/protocol/RotateHeadPacket.php b/src/pocketmine/network/protocol/RotateHeadPacket.php index 81458b9d2..8c2ec7fc9 100644 --- a/src/pocketmine/network/protocol/RotateHeadPacket.php +++ b/src/pocketmine/network/protocol/RotateHeadPacket.php @@ -37,7 +37,7 @@ class RotateHeadPacket extends DataPacket{ public function encode(){ $this->reset(); $this->putInt($this->eid); - $this->putByte($this->yaw); + $this->putByte((int) ($this->yaw / 360)); } } \ No newline at end of file