mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 10:49:10 +00:00
Added RotateHeadPacket
This commit is contained in:
parent
de5e9df82b
commit
c2d760e6d9
@ -1283,6 +1283,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
|||||||
$this->server->getLogger()->warning($this->username." moved too quickly!");
|
$this->server->getLogger()->warning($this->username." moved too quickly!");
|
||||||
}
|
}
|
||||||
}else{*/
|
}else{*/
|
||||||
|
|
||||||
if(!$this->setPositionAndRotation($newPos, $packet->yaw, $packet->pitch)){
|
if(!$this->setPositionAndRotation($newPos, $packet->yaw, $packet->pitch)){
|
||||||
$pk = new MovePlayerPacket();
|
$pk = new MovePlayerPacket();
|
||||||
$pk->eid = 0;
|
$pk->eid = 0;
|
||||||
|
@ -37,7 +37,7 @@ class RotateHeadPacket extends DataPacket{
|
|||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putInt($this->eid);
|
$this->putInt($this->eid);
|
||||||
$this->putByte($this->yaw);
|
$this->putByte((int) ($this->yaw / 360));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user