diff --git a/src/network/mcpe/handler/InGamePacketHandler.php b/src/network/mcpe/handler/InGamePacketHandler.php index dc2a5e468..97d45ee89 100644 --- a/src/network/mcpe/handler/InGamePacketHandler.php +++ b/src/network/mcpe/handler/InGamePacketHandler.php @@ -90,6 +90,8 @@ use pocketmine\network\mcpe\protocol\SubClientLoginPacket; use pocketmine\network\mcpe\protocol\TextPacket; use pocketmine\network\mcpe\protocol\types\ActorEvent; use pocketmine\network\mcpe\protocol\types\BlockPosition; +use pocketmine\network\mcpe\protocol\types\entity\EntityMetadataProperties; +use pocketmine\network\mcpe\protocol\types\entity\FloatMetadataProperty; use pocketmine\network\mcpe\protocol\types\inventory\ContainerIds; use pocketmine\network\mcpe\protocol\types\inventory\MismatchTransactionData; use pocketmine\network\mcpe\protocol\types\inventory\NetworkInventoryAction; @@ -222,6 +224,11 @@ class InGamePacketHandler extends PacketHandler{ ($gliding !== null && !$this->player->toggleGlide($gliding)); if((bool) $mismatch){ $this->player->sendData([$this->player]); + }elseif($packet->hasFlag(PlayerAuthInputFlags::STOP_SWIMMING) || $packet->hasFlag(PlayerAuthInputFlags::STOP_GLIDING)){ + //TODO: HACK! workaround for a client bug where the AABB doesn't change back properly when stopping swimming or gliding + $this->player->sendData([$this->player], [ + EntityMetadataProperties::BOUNDING_BOX_HEIGHT => new FloatMetadataProperty($this->player->getSize()->getHeight()) + ]); } if($packet->hasFlag(PlayerAuthInputFlags::START_JUMPING)){