From 518902caf40578a80dcae8ad61bf1eda0e03073f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 19 Mar 2013 23:44:23 +0100 Subject: [PATCH] fixed creative players taking damage --- src/world/Entity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index fa9648fb..85309794 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -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{