mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Fixed PMFLevel infinite loop
This commit is contained in:
parent
47893ed765
commit
cbe07a1fa0
@ -228,16 +228,12 @@ class PMFLevel extends PMF{
|
|||||||
if(!file_exists($path)){
|
if(!file_exists($path)){
|
||||||
if($this->generateChunk($X, $Z) === false){
|
if($this->generateChunk($X, $Z) === false){
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}elseif($this->isGenerating === 0){
|
||||||
$this->populateChunk($X, $Z);
|
$this->populateChunk($X, $Z);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->isGenerating === 0 and !$this->isPopulated($X, $Z)){
|
|
||||||
$this->populateChunk($X, $Z);
|
|
||||||
}
|
|
||||||
|
|
||||||
$chunk = @gzopen($path, "rb");
|
$chunk = @gzopen($path, "rb");
|
||||||
if($chunk === false){
|
if($chunk === false){
|
||||||
return false;
|
return false;
|
||||||
@ -261,6 +257,9 @@ class PMFLevel extends PMF{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@gzclose($chunk);
|
@gzclose($chunk);
|
||||||
|
if($this->isGenerating === 0 and !$this->isPopulated($X, $Z)){
|
||||||
|
$this->populateChunk($X, $Z);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user