diff --git a/src/Player.php b/src/Player.php index 108634c0ef..30773bd89b 100644 --- a/src/Player.php +++ b/src/Player.php @@ -62,7 +62,6 @@ class Player{ private $chunksOrder = array(); private $lag = array(0, 0); private $spawnPosition; - private $freedChunks = true; public $itemEnforcement; public $lastCorrect; private $bigCnt; @@ -149,19 +148,9 @@ class Player{ $c = key($this->chunksOrder); $d = @$this->chunksOrder[$c]; if($c === null or $d > $this->server->api->getProperty("view-distance")){ - if($this->freedChunks === false){ - foreach($this->chunksOrder as $c => $d){ - $id = explode(":", $c); - $X = $id[0]; - $Z = $id[2]; - $this->level->freeChunk($X, $Z, $this); - } - $this->freedChunks = true; - } $this->server->schedule(50, array($this, "getNextChunk")); return false; } - $this->freedChunks = false; unset($this->chunksOrder[$c]); $this->chunksLoaded[$c] = true; $id = explode(":", $c); diff --git a/src/world/Entity.php b/src/world/Entity.php index 4c6035f370..544fa52509 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -108,18 +108,18 @@ class Entity extends Position{ $this->stack = (int) $this->data["stack"]; } $this->setHealth(5, "generic"); - $this->server->schedule(5, array($this, "update"), array(), true); + $this->server->schedule(10, array($this, "update"), array(), true); $this->size = 0.5; break; case ENTITY_MOB: $this->setHealth($this->data["Health"], "generic"); - $this->server->schedule(5, array($this, "update"), array(), true); + $this->server->schedule(10, array($this, "update"), array(), true); //$this->setName((isset($mobs[$this->type]) ? $mobs[$this->type]:$this->type)); $this->size = 1; break; case ENTITY_FALLING: $this->setHealth(PHP_INT_MAX, "generic"); - $this->server->schedule(5, array($this, "update"), array(), true); + $this->server->schedule(10, array($this, "update"), array(), true); $this->size = 0.98; break; case ENTITY_OBJECT: