mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
SubChunk: fixed light array GC since native LightArray introduction
since this went native, there was no support for copy-on-write, so this was only lazy-inited, but never cleaned if the array remained empty.
This commit is contained in:
parent
11d2e1ef08
commit
bc6e73e81d
@ -145,11 +145,11 @@ class SubChunk{
|
||||
}
|
||||
$this->blockLayers = array_values($this->blockLayers);
|
||||
|
||||
if($this->skyLight !== null){
|
||||
$this->skyLight->collectGarbage();
|
||||
if($this->skyLight !== null && $this->skyLight->isUniform(0)){
|
||||
$this->skyLight = null;
|
||||
}
|
||||
if($this->blockLight !== null){
|
||||
$this->blockLight->collectGarbage();
|
||||
if($this->blockLight !== null && $this->blockLight->isUniform(0)){
|
||||
$this->blockLight = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user