Better chunk unload queues

This commit is contained in:
Shoghi Cervantes 2014-07-11 01:15:52 +02:00
parent 91b2f81f3c
commit 4a072b4163

View File

@ -350,6 +350,7 @@ class Level implements ChunkManager, Metadatable{
*/
public function freeChunk($X, $Z, Player $player){
unset($this->usedChunks[Level::chunkHash($X, $Z)][$player->getID()]);
$this->unloadChunkRequest($X, $Z, true);
}
/**
@ -1697,10 +1698,11 @@ class Level implements ChunkManager, Metadatable{
if(count($c) === 0){
Level::getXZ($i, $X, $Z);
if(!$this->isSpawnChunk($X, $Z)){
$this->unloadChunkRequest($X, $Z, true);
$this->unloadChunk($X, $Z, true);
}
}
}
}