From 582f1540a7ddc3b6c34de5762b30b75f59d648f8 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 10 Aug 2014 13:22:12 +0200 Subject: [PATCH] Players are now moved using the head, closes #1842 --- src/pocketmine/Player.php | 5 ++--- src/pocketmine/entity/Entity.php | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 787e9190b..4e3e13125 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -105,7 +105,6 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ const SPECTATOR = 3; const VIEW = Player::SPECTATOR; - const MAX_QUEUE = 2048; const SURVIVAL_SLOTS = 36; const CREATIVE_SLOTS = 112; @@ -1325,7 +1324,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $pk = new MovePlayerPacket(); $pk->eid = 0; $pk->x = $this->x; - $pk->y = $this->y; + $pk->y = $this->y + $this->height; //teleport from head $pk->z = $this->z; $pk->bodyYaw = $this->yaw; $pk->pitch = $this->pitch; @@ -2267,7 +2266,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $pk = new MovePlayerPacket; $pk->eid = 0; $pk->x = $this->x; - $pk->y = $this->y; + $pk->y = $this->y + $this->height; //teleport from head $pk->z = $this->z; $pk->bodyYaw = $this->yaw; $pk->pitch = $this->pitch; diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 999aa1c92..518f1f6d8 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -491,7 +491,7 @@ abstract class Entity extends Position implements Metadatable{ $pk = new MovePlayerPacket; $pk->eid = $this->id; $pk->x = $this->x; - $pk->y = $this->y; + $pk->y = $this->y + $this->height; //teleport from head $pk->z = $this->z; $pk->yaw = $this->yaw; $pk->pitch = $this->pitch;