Added yaw/pitch on spawn

This commit is contained in:
Shoghi Cervantes
2014-06-23 16:07:59 +02:00
parent 4b3addb8a0
commit bcb401c0c3
3 changed files with 8 additions and 6 deletions

View File

@ -30,6 +30,8 @@ use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Enum;
use pocketmine\nbt\tag\Short;
use pocketmine\network\protocol\AddPlayerPacket;
use pocketmine\network\protocol\MoveEntityPacket_PosRot;
use pocketmine\network\protocol\MovePlayerPacket;
use pocketmine\network\protocol\RemovePlayerPacket;
use pocketmine\network\protocol\SetEntityMotionPacket;
use pocketmine\Network;
@ -145,8 +147,8 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
$pk->x = $this->x;
$pk->y = $this->y;
$pk->z = $this->z;
$pk->yaw = 0;
$pk->pitch = 0;
$pk->yaw = $this->yaw;
$pk->pitch = $this->pitch;
$pk->unknown1 = 0;
$pk->unknown2 = 0;
$pk->metadata = $this->getData();