mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-08 04:38:35 +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()){
|
if($this->isAlive()){
|
||||||
$this->applyPostDamageEffects($source);
|
$this->applyPostDamageEffects($source);
|
||||||
$this->doHitAnimation();
|
$this->doHitAnimation();
|
||||||
}else{
|
|
||||||
$this->startDeathAnimation();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,6 +595,7 @@ abstract class Living extends Entity implements Damageable{
|
|||||||
public function kill() : void{
|
public function kill() : void{
|
||||||
parent::kill();
|
parent::kill();
|
||||||
$this->onDeath();
|
$this->onDeath();
|
||||||
|
$this->startDeathAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function onDeath() : void{
|
protected function onDeath() : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user