Index fix

This commit is contained in:
Shoghi Cervantes Pueyo 2013-05-17 13:19:44 +02:00
parent b82e9b2895
commit 2377cf7199

View File

@ -191,12 +191,12 @@ class PMFLevel extends PMF{
public function loadChunk($X, $Z){ public function loadChunk($X, $Z){
$X = (int) $X; $X = (int) $X;
$Z = (int) $Z; $Z = (int) $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;
} }
$index = $this->getIndex($X, $Z);
$info = $this->locationTable[$index]; $info = $this->locationTable[$index];
$this->seek($info[0]); $this->seek($info[0]);