From f5822c6de8c8a5af885e288b627255502b5232d6 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 29 Sep 2014 12:59:01 +0200 Subject: [PATCH] Improved entity movement updates --- src/pocketmine/Player.php | 1 + src/pocketmine/entity/DroppedItem.php | 1 + src/pocketmine/entity/Entity.php | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index a05e32a12..52927ef99 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1156,6 +1156,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $this->directDataPacket($pk); $this->forceMovement = new Vector3($this->x, $this->y, $this->z); }else{ + $this->updateMovement(); $this->forceMovement = null; } } diff --git a/src/pocketmine/entity/DroppedItem.php b/src/pocketmine/entity/DroppedItem.php index 6aaeb4aa5..d35f7dd21 100644 --- a/src/pocketmine/entity/DroppedItem.php +++ b/src/pocketmine/entity/DroppedItem.php @@ -98,6 +98,7 @@ class DroppedItem extends Entity{ if($this->age > 6000){ $this->kill(); } + $this->updateMovement(); return !$this->onGround or ($this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0); diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index d8374ec42..5aac09992 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -468,7 +468,6 @@ abstract class Entity extends Position implements Metadatable{ } $hasUpdate = false; - $this->updateMovement(); $this->checkBlockCollision(); @@ -579,6 +578,8 @@ abstract class Entity extends Position implements Metadatable{ $hasUpdate = $this->entityBaseTick(); + $this->updateMovement(); + //if($this->isStatic()) return true; //return !($this instanceof Player);