From c3a795e876071601ee31ecfddc6218d8c58b79fa Mon Sep 17 00:00:00 2001 From: Govdim <50422762+Govdim@users.noreply.github.com> Date: Sun, 24 May 2020 16:03:14 +0300 Subject: [PATCH] Fix walk sounds (#3492) Co-authored-by: Govdim --- src/pocketmine/Player.php | 1 + src/pocketmine/entity/Entity.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 0f2cdd8d7..bcb3bda94 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -3743,6 +3743,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{ $pk->headYaw = $yaw; $pk->yaw = $yaw; $pk->mode = $mode; + $pk->onGround = $this->onGround; if($targets !== null){ $this->server->broadcastPacket($targets, $pk); diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index d2157322e..26027ad80 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1168,6 +1168,9 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ if($teleport){ $pk->flags |= MoveActorAbsolutePacket::FLAG_TELEPORT; } + if($this->onGround){ + $pk->flags |= MoveActorAbsolutePacket::FLAG_GROUND; + } $this->level->broadcastPacketToViewers($this, $pk); }