mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-09 21:24:53 +00:00
Removed incorrect unloaded chunk detection
This commit is contained in:
parent
0522052c75
commit
d7f74a6725
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user