From 09efcec60570f7f2be50453dc0bf5184a49bfcc1 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Thu, 30 May 2013 16:45:44 +0200 Subject: [PATCH] Better entity position sending using motion update --- src/world/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 6a3adb58..2839f8d0 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -454,7 +454,7 @@ class Entity extends Position{ } } - if($this->class !== ENTITY_OBJECT and ($this->last[0] != $this->x or $this->last[1] != $this->y or $this->last[2] != $this->z or $this->last[3] != $this->yaw or $this->last[4] != $this->pitch)){ + if($this->class !== ENTITY_OBJECT and ($this->class === ENTITY_PLAYER or ($this->last[5] + 8) < $now) and ($this->last[0] != $this->x or $this->last[1] != $this->y or $this->last[2] != $this->z or $this->last[3] != $this->yaw or $this->last[4] != $this->pitch)){ if($this->server->api->handle("entity.move", $this) === false){ if($this->class === ENTITY_PLAYER){ $this->player->teleport(new Vector3($this->last[0], $this->last[1], $this->last[2]), $this->last[3], $this->last[4]);