From ecc2faffea9f9ac0ae323763e1c021f3991ccdc1 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 31 Mar 2013 14:44:39 +0200 Subject: [PATCH] Fixed #128 player death --- src/world/Entity.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/world/Entity.php b/src/world/Entity.php index 9f2aae54e..53cd3dfde 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -621,7 +621,20 @@ class Entity extends stdClass{ $this->fallStart = false; $this->updateMetadata(); $this->dead = true; - $this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 3)); //Entity dead + if($this->player instanceof Player){ + $x = $this->x; + $y = $this->y; + $z = $this->z; + $this->x = 0; + $this->y = -10; + $this->z = 0; + $this->server->api->dhandle("entity.move", $this); + $this->x = $x; + $this->y = $y; + $this->z = $z; + }else{ + $this->server->api->dhandle("entity.event", array("entity" => $this, "event" => 3)); //Entity dead + } if($this->player instanceof Player){ $this->server->api->dhandle("player.death", array("name" => $this->name, "cause" => $cause)); }else{