diff --git a/src/Player.php b/src/Player.php index d9c14a5d..cad8d010 100755 --- a/src/Player.php +++ b/src/Player.php @@ -256,7 +256,6 @@ class Player{ if($this->connected === false){ return false; } - if(EventHandler::callEvent(new DataPacketSendEvent($this, $packet)) === BaseEvent::DENY){ return; } diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 89c101b0..bb0ea934 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -736,7 +736,7 @@ class Entity extends Position if($this->lastHeadYaw != $this->headYaw){ $this->sendHeadYaw(); } - if($this->class !== ENTITY_PLAYER && $update){ + if($this->class === ENTITY_PLAYER || $update){ $this->updateMovement(); } @@ -770,14 +770,13 @@ class Entity extends Position $pk = new MovePlayerPacket(); $pk->eid = $this->eid; $pk->x = $this->x; - $pk->y = $this->y + $this->getEyeHeight(); + $pk->y = $this->y; $pk->z = $this->z; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch; $pk->bodyYaw = $this->yaw; $this->server->api->player->broadcastPacket($players, $pk); } else{ - $pk = new MoveEntityPacket; $pk->entities = [[$this->eid, $this->x, $this->y, $this->z, $this->yaw, $this->pitch]]; $this->server->api->player->broadcastPacket($players, $pk); diff --git a/src/network/protocol/packet/MovePlayerPacket.php b/src/network/protocol/packet/MovePlayerPacket.php index a38e8de5..b2f6f30a 100644 --- a/src/network/protocol/packet/MovePlayerPacket.php +++ b/src/network/protocol/packet/MovePlayerPacket.php @@ -21,7 +21,6 @@ class MovePlayerPacket extends RakNetDataPacket{ $this->yaw = $this->getFloat(); $this->pitch = $this->getFloat(); $this->bodyYaw = $this->getFloat(); - $flags = $this->getByte(); $this->teleport = ($this->getByte() & 0x80) > 0; }