From c2db634fcf4bcb01c6a497aa4da69927c4c576ed Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sun, 9 Dec 2012 23:03:24 +0100 Subject: [PATCH] Entity spawning FIX --- classes/Session.class.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/classes/Session.class.php b/classes/Session.class.php index 8cae2a433..5776b6b52 100644 --- a/classes/Session.class.php +++ b/classes/Session.class.php @@ -335,17 +335,15 @@ class Session{ )); foreach($this->server->entities as $entity){ if($entity->eid !== $this->eid){ - if($entity->class === 0){ - $this->server->trigger("onPlayerAdd", array( + if($entity->class === ENTITY_PLAYER){ + $this->eventHandler(array( "clientID" => $entity->data["clientID"], "username" => $entity->name, "eid" => $entity->eid, "x" => $entity->position["x"], "y" => $entity->position["y"], "z" => $entity->position["z"], - "yaw" => $entity->position["yaw"], - "pitch" => $entity->position["pitch"], - )); + ), "onPlayerAdd"); }else{ $this->send(0x84, array( $this->counter[0],