mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +00:00
Fixed infinite Entity recursion on chunk load
This commit is contained in:
parent
b761a97660
commit
422262d585
@ -208,8 +208,7 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
$this->initEntity();
|
$this->initEntity();
|
||||||
$this->lastUpdate = $this->spawnTime = microtime(true);
|
$this->lastUpdate = $this->spawnTime = microtime(true);
|
||||||
$this->server->getPluginManager()->callEvent(new EntitySpawnEvent($this));
|
$this->server->getPluginManager()->callEvent(new EntitySpawnEvent($this));
|
||||||
$this->onUpdate();
|
|
||||||
$this->justCreated = false;
|
|
||||||
$this->scheduleUpdate();
|
$this->scheduleUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -453,6 +452,7 @@ abstract class Entity extends Position implements Metadatable{
|
|||||||
public function entityBaseTick(){
|
public function entityBaseTick(){
|
||||||
//TODO: check vehicles
|
//TODO: check vehicles
|
||||||
|
|
||||||
|
$this->justCreated = false;
|
||||||
|
|
||||||
if($this->dead === true and !($this instanceof Player)){
|
if($this->dead === true and !($this instanceof Player)){
|
||||||
$this->close();
|
$this->close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user