Compatibility with pthreads > 2.0.8

This commit is contained in:
Shoghi Cervantes
2014-10-02 16:58:37 +02:00
parent 539fa232f8
commit 602bdf27a5
12 changed files with 58 additions and 37 deletions

View File

@ -459,6 +459,8 @@ abstract class Entity extends Position implements Metadatable{
}
public function entityBaseTick(){
Timings::$tickEntityTimer->startTiming();
//TODO: check vehicles
$this->justCreated = false;
@ -466,7 +468,7 @@ abstract class Entity extends Position implements Metadatable{
if($this->dead === true and !$isPlayer){
$this->close();
Timings::$tickEntityTimer->stopTiming();
return false;
}elseif($this->dead === true){
$this->despawnFromAll();
@ -509,6 +511,8 @@ abstract class Entity extends Position implements Metadatable{
++$this->age;
++$this->ticksLived;
Timings::$tickEntityTimer->stopTiming();
}
public function updateMovement(){
@ -1163,9 +1167,6 @@ abstract class Entity extends Position implements Metadatable{
$this->server->getPluginManager()->callEvent(new EntityDespawnEvent($this));
$this->closed = true;
unset($this->level->updateEntities[$this->id]);
if($this->chunk instanceof FullChunk){
$this->chunk->removeEntity($this);
}
if(($level = $this->getLevel()) instanceof Level){
$level->removeEntity($this);
}