Limited death animation to Living entities

This commit is contained in:
Shoghi Cervantes
2014-12-09 14:57:28 +01:00
parent 04ecbd1a76
commit ea8f10efa4
2 changed files with 19 additions and 7 deletions

View File

@@ -528,16 +528,13 @@ abstract class Entity extends Location implements Metadatable{
$isPlayer = $this instanceof Player;
if($this->dead === true){
++$this->deadTicks;
if($this->deadTicks >= 10){
$this->despawnFromAll();
if(!$isPlayer){
$this->close();
}
$this->despawnFromAll();
if(!$isPlayer){
$this->close();
}
Timings::$tickEntityTimer->stopTiming();
return $this->deadTicks < 10;
return false;
}
$hasUpdate = false;