mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed player heads not being rotated
This commit is contained in:
parent
2b0fdd5062
commit
1a7e916928
@ -388,17 +388,17 @@ class CustomPacketHandler{
|
||||
$this->data["x"] = Utils::readFloat($this->get(4));
|
||||
$this->data["y"] = Utils::readFloat($this->get(4));
|
||||
$this->data["z"] = Utils::readFloat($this->get(4));
|
||||
$this->data["bodyYaw"] = Utils::readFloat($this->get(4));
|
||||
$this->data["pitch"] = Utils::readFloat($this->get(4));
|
||||
$this->data["yaw"] = Utils::readFloat($this->get(4));
|
||||
$this->data["pitch"] = Utils::readFloat($this->get(4));
|
||||
$this->data["bodyYaw"] = Utils::readFloat($this->get(4));
|
||||
}else{
|
||||
$this->raw .= Utils::writeInt($this->data["eid"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["x"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["y"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["z"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["bodyYaw"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["pitch"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["yaw"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["pitch"]);
|
||||
$this->raw .= Utils::writeFloat($this->data["bodyYaw"]);
|
||||
}
|
||||
break;
|
||||
case MC_PLACE_BLOCK:
|
||||
|
@ -565,15 +565,25 @@ class Entity extends Position{
|
||||
$players = $this->server->api->player->getAll($this->level);
|
||||
if($this->player instanceof Player){
|
||||
unset($players[$this->player->CID]);
|
||||
$this->server->api->player->broadcastPacket($players, MC_MOVE_PLAYER, array(
|
||||
"eid" => $this->eid,
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
"z" => $this->z,
|
||||
"yaw" => $this->yaw,
|
||||
"pitch" => $this->pitch,
|
||||
"bodyYaw" => $this->yaw,
|
||||
));
|
||||
}else{
|
||||
$this->server->api->player->broadcastPacket($players, MC_MOVE_ENTITY_POSROT, array(
|
||||
"eid" => $this->eid,
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
"z" => $this->z,
|
||||
"yaw" => $this->yaw,
|
||||
"pitch" => $this->pitch,
|
||||
));
|
||||
}
|
||||
$this->server->api->player->broadcastPacket($players, MC_MOVE_ENTITY_POSROT, array(
|
||||
"eid" => $this->eid,
|
||||
"x" => $this->x,
|
||||
"y" => $this->y,
|
||||
"z" => $this->z,
|
||||
"yaw" => $this->yaw,
|
||||
"pitch" => $this->pitch,
|
||||
));
|
||||
}
|
||||
}else{
|
||||
$this->updatePosition($this->x, $this->y, $this->z, $this->yaw, $this->pitch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user