Added RotateHeadPacket

This commit is contained in:
Shoghi Cervantes 2014-06-25 23:09:22 +02:00
parent de5e9df82b
commit c2d760e6d9
2 changed files with 2 additions and 1 deletions

View File

@ -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;

View File

@ -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));
}
}