mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
k
This commit is contained in:
parent
75bab57b3f
commit
ed8c2eeccd
2 changed files with 7 additions and 5 deletions
|
|
@ -192,8 +192,8 @@ class Player{
|
||||||
|
|
||||||
$c = key($this->chunksOrder);
|
$c = key($this->chunksOrder);
|
||||||
$d = @$this->chunksOrder[$c];
|
$d = @$this->chunksOrder[$c];
|
||||||
if($c === null or $d > $this->server->api->getProperty("view-distance")){
|
if($c === null or $d === null){
|
||||||
$this->server->schedule(50, array($this, "getNextChunk"));
|
$this->server->schedule(40, array($this, "getNextChunk"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
unset($this->chunksOrder[$c]);
|
unset($this->chunksOrder[$c]);
|
||||||
|
|
|
||||||
|
|
@ -200,14 +200,16 @@ class PMFLevel extends PMF{
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadChunk($X, $Z){
|
public function loadChunk($X, $Z){
|
||||||
$X = (int) $X;
|
|
||||||
$Z = (int) $Z;
|
$index = self::getIndex($X, $Z);
|
||||||
$index = $this->getIndex($X, $Z);
|
|
||||||
if($this->isChunkLoaded($X, $Z)){
|
if($this->isChunkLoaded($X, $Z)){
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}elseif(!isset($this->locationTable[$index])){
|
}elseif(!isset($this->locationTable[$index])){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info = $this->locationTable[$index];
|
$info = $this->locationTable[$index];
|
||||||
$this->seek($info[0]);
|
$this->seek($info[0]);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue