mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
World: do not update entities which have been flagged for despawn
fixes #4718
This commit is contained in:
parent
a67aef0477
commit
061d851fbd
@ -854,7 +854,7 @@ class World implements ChunkManager{
|
||||
//Update entities that need update
|
||||
Timings::$tickEntity->startTiming();
|
||||
foreach($this->updateEntities as $id => $entity){
|
||||
if($entity->isClosed() or !$entity->onUpdate($currentTick)){
|
||||
if($entity->isClosed() or $entity->isFlaggedForDespawn() or !$entity->onUpdate($currentTick)){
|
||||
unset($this->updateEntities[$id]);
|
||||
}
|
||||
if($entity->isFlaggedForDespawn()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user