fixed target invalidation

This commit is contained in:
GameHerobrine 2024-02-14 05:49:06 +03:00
parent 7ad98fe444
commit 75844b5a62
3 changed files with 4 additions and 3 deletions

View file

@ -1399,7 +1399,7 @@ class Entity extends Position
if($health < $this->health){
$harm = true;
$dmg = $this->health - $health;
if(($this->class !== ENTITY_PLAYER or (($this->player instanceof Player) and (($this->player->gamemode & 0x01) === 0x00 or $force === true))) and ($this->dmgcounter[0] < microtime(true) or $this->dmgcounter[1] < $dmg) and ! $this->dead){
if(($this->class !== ENTITY_PLAYER or (($this->player instanceof Player) and (($this->player->gamemode & 0x01) === 0x00 or $force === true))) and ($this->dmgcounter[0] < microtime(true) or $this->dmgcounter[1] < $dmg) and !$this->dead){
$this->dmgcounter[0] = microtime(true) + 0.5;
$this->dmgcounter[1] = $dmg;
} else{