From 36fdb10b9e6abb69f0f5f8b716866b1390cd2c75 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 26 Jan 2013 17:19:52 +0100 Subject: [PATCH] Fixed random suffocation --- src/classes/world/Entity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/classes/world/Entity.php b/src/classes/world/Entity.php index b8ce3ee0..ed87f226 100644 --- a/src/classes/world/Entity.php +++ b/src/classes/world/Entity.php @@ -123,7 +123,7 @@ class Entity extends stdClass{ } break; default: - if($this->inBlock($x, $y, $z) and !isset(Material::$transparent[$b[0]])){ + if($this->inBlock($x, $y, $z, 0.7) and !isset(Material::$transparent[$b[0]])){ $this->harm(1, "suffocation"); //Suffocation }elseif($x == ($endX - 1) and $y == $endY and $z == ($endZ - 1)){ $this->air = 300; //Breathing @@ -333,7 +333,7 @@ class Entity extends stdClass{ $health = (int) $health; if($health < $this->health){ $dmg = $this->health - $health; - if(($this->gamemode === 0 or $force === true) and ($this->dmgcounter[0] < microtime(true) or $this->dmgcounter[1] < $dmg) and !$this->dead){ + if(($this->server->gamemode === 0 or $force === true) and ($this->dmgcounter[0] < microtime(true) or $this->dmgcounter[1] < $dmg) and !$this->dead){ $this->dmgcounter = array(microtime(true) + 0.5, $dmg); }else{ return false; //Entity inmunity