should have fixed spawn

This commit is contained in:
GameHerobrine 2023-07-08 22:06:58 +03:00
parent 28c0541164
commit 5b2c7bc9d0
3 changed files with 28 additions and 17 deletions

View file

@ -8,7 +8,7 @@ class MovePlayerPacket extends RakNetDataPacket{
public $yaw;
public $pitch;
public $bodyYaw;
public $teleport;
public function pid(){
return ProtocolInfo::MOVE_PLAYER_PACKET;
}
@ -19,8 +19,9 @@ class MovePlayerPacket extends RakNetDataPacket{
$this->y = $this->getFloat();
$this->z = $this->getFloat();
$this->yaw = $this->getFloat();
$this->pitch = $this->getFloat();
$this->bodyYaw = $this->getFloat();
$this->pitch = $this->getFloat();
$this->teleport = ($this->getByte() & 0x80) > 0;
}
public function encode(){
@ -32,6 +33,7 @@ class MovePlayerPacket extends RakNetDataPacket{
$this->putFloat($this->yaw);
$this->putFloat($this->pitch);
$this->putFloat($this->bodyYaw);
$this->putByte($this->teleport ? 0x80 : 0x00);
}
}