From 2a5d954c671a6fa43db308443770d597eca3296b Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 10 Oct 2017 22:45:30 +0100 Subject: [PATCH] fixed yaw/headyaw field order I wish they'd stop changing this shit... this is the third or fourth time now? --- src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php | 8 ++++---- src/pocketmine/network/mcpe/protocol/MovePlayerPacket.php | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php index 7de94d503..2a9308f84 100644 --- a/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php +++ b/src/pocketmine/network/mcpe/protocol/AddPlayerPacket.php @@ -48,10 +48,10 @@ class AddPlayerPacket extends DataPacket{ public $motion; /** @var float */ public $pitch = 0.0; - /** @var float|null */ - public $headYaw = null; //TODO /** @var float */ public $yaw = 0.0; + /** @var float|null */ + public $headYaw = null; //TODO /** @var Item */ public $item; /** @var array */ @@ -77,8 +77,8 @@ class AddPlayerPacket extends DataPacket{ $this->position = $this->getVector3Obj(); $this->motion = $this->getVector3Obj(); $this->pitch = $this->getLFloat(); - $this->headYaw = $this->getLFloat(); $this->yaw = $this->getLFloat(); + $this->headYaw = $this->getLFloat(); $this->item = $this->getSlot(); $this->metadata = $this->getEntityMetadata(); @@ -104,8 +104,8 @@ class AddPlayerPacket extends DataPacket{ $this->putVector3Obj($this->position); $this->putVector3ObjNullable($this->motion); $this->putLFloat($this->pitch); - $this->putLFloat($this->headYaw ?? $this->yaw); $this->putLFloat($this->yaw); + $this->putLFloat($this->headYaw ?? $this->yaw); $this->putSlot($this->item); $this->putEntityMetadata($this->metadata); diff --git a/src/pocketmine/network/mcpe/protocol/MovePlayerPacket.php b/src/pocketmine/network/mcpe/protocol/MovePlayerPacket.php index 371c2936d..117463bf9 100644 --- a/src/pocketmine/network/mcpe/protocol/MovePlayerPacket.php +++ b/src/pocketmine/network/mcpe/protocol/MovePlayerPacket.php @@ -44,9 +44,9 @@ class MovePlayerPacket extends DataPacket{ /** @var float */ public $pitch; /** @var float */ - public $headYaw; - /** @var float */ public $yaw; + /** @var float */ + public $headYaw; /** @var int */ public $mode = self::MODE_NORMAL; /** @var bool */ @@ -62,8 +62,8 @@ class MovePlayerPacket extends DataPacket{ $this->entityRuntimeId = $this->getEntityRuntimeId(); $this->position = $this->getVector3Obj(); $this->pitch = $this->getLFloat(); - $this->headYaw = $this->getLFloat(); $this->yaw = $this->getLFloat(); + $this->headYaw = $this->getLFloat(); $this->mode = $this->getByte(); $this->onGround = $this->getBool(); $this->ridingEid = $this->getEntityRuntimeId(); @@ -77,8 +77,8 @@ class MovePlayerPacket extends DataPacket{ $this->putEntityRuntimeId($this->entityRuntimeId); $this->putVector3Obj($this->position); $this->putLFloat($this->pitch); - $this->putLFloat($this->headYaw); //TODO $this->putLFloat($this->yaw); + $this->putLFloat($this->headYaw); //TODO $this->putByte($this->mode); $this->putBool($this->onGround); $this->putEntityRuntimeId($this->ridingEid);