mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
headYaw was added
This commit is contained in:
parent
cf13bd4c43
commit
685efef843
3 changed files with 20 additions and 20 deletions
|
|
@ -35,10 +35,7 @@ class TaskRandomWalk extends TaskBase
|
|||
$ai->entity->moveEntityWithOffset(($this->x > 0 ? 1 : ($this->x < 0 ? -1 : 0)), 0, ($this->z > 0 ? 1 : ($this->z < 0 ? -1 : 0)));
|
||||
if($this->looking){
|
||||
$this->testLook($ai, $ai->entity->speedX, $ai->entity->speedZ);
|
||||
$pk = new RotateHeadPacket();
|
||||
$pk->eid = $ai->entity->eid;
|
||||
$pk->yaw = $ai->entity->yaw;
|
||||
$ai->entity->server->api->player->broadcastPacket($ai->entity->level->players, $pk);
|
||||
$ai->entity->headYaw = $ai->entity->yaw;
|
||||
$this->looking = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue