mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Fix a very rare light propagation bug
This could occur when light sources were placed near each other and one of them is removed, the other's light would not be propagated far enough because the node wasn't queued for updating although it was marked as if it was.
This commit is contained in:
@ -158,11 +158,9 @@ abstract class LightUpdate{
|
||||
if($current < $potentialLight){
|
||||
$this->setLight($x, $y, $z, $potentialLight);
|
||||
|
||||
if(!isset($this->spreadVisited[$index = Level::blockHash($x, $y, $z)])){
|
||||
if(!isset($this->spreadVisited[$index = Level::blockHash($x, $y, $z)]) and $potentialLight > 1){
|
||||
$this->spreadVisited[$index] = true;
|
||||
if($potentialLight > 1){
|
||||
$this->spreadQueue->enqueue([$x, $y, $z]);
|
||||
}
|
||||
$this->spreadQueue->enqueue([$x, $y, $z]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user