fixed creative players taking damage

This commit is contained in:
Shoghi Cervantes Pueyo 2013-03-19 23:44:23 +01:00
parent 2c3ab413f5
commit 518902caf4

View File

@ -574,7 +574,7 @@ class Entity extends stdClass{
if($health < $this->health){
$harm = true;
$dmg = $this->health - $health;
if(($this->server->gamemode === 0 or $this->server->gamemode === 2 or $force === true or $this->class !== ENTITY_PLAYER) 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 === SURVIVAL or $this->player->gamemode === ADVENTURE 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{