i commited a crime

This commit is contained in:
GameHerobrine 2023-08-28 23:32:37 +03:00
parent c96a8f3491
commit be12c3a3bf
3 changed files with 2 additions and 5 deletions

View file

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