Entity: fixed extremely stupid bug with player respawning after ragequit

This commit is contained in:
Dylan K. Taylor 2021-05-11 19:08:56 +01:00
parent 0ff21557e4
commit 094c949e86
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -546,8 +546,12 @@ abstract class Entity{
}
if($amount <= 0){
if($this->isAlive() and !$this->justCreated){
$this->kill();
if($this->isAlive()){
if(!$this->justCreated){
$this->kill();
}else{
$this->health = 0;
}
}
}elseif($amount <= $this->getMaxHealth() or $amount < $this->health){
$this->health = $amount;