mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Living: fixed death animation not being played when kill() is used
this fixes players having a random delayed despawn when using /kill on themselves
This commit is contained in:
parent
905259a4e1
commit
a57ec1b1ba
@ -557,8 +557,6 @@ abstract class Living extends Entity implements Damageable{
|
||||
if($this->isAlive()){
|
||||
$this->applyPostDamageEffects($source);
|
||||
$this->doHitAnimation();
|
||||
}else{
|
||||
$this->startDeathAnimation();
|
||||
}
|
||||
}
|
||||
|
||||
@ -597,6 +595,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
public function kill() : void{
|
||||
parent::kill();
|
||||
$this->onDeath();
|
||||
$this->startDeathAnimation();
|
||||
}
|
||||
|
||||
protected function onDeath() : void{
|
||||
|
Loading…
x
Reference in New Issue
Block a user