mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Limited death animation to Living entities
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user