Correct teleporting with the new player list handling

This commit is contained in:
Shoghi Cervantes
2013-08-20 02:06:14 +02:00
parent 7102787aa9
commit bf1b00f0e6
4 changed files with 42 additions and 37 deletions

View File

@ -116,7 +116,7 @@ class EntityAPI{
public function spawnToAll(Entity $e){
foreach($this->server->api->player->getAll($e->level) as $player){
if($player->eid !== false and $player->eid !== $e->eid){
if($player->eid !== false and $player->eid !== $e->eid and $e->class !== ENTITY_PLAYER){
$e->spawn($player);
}
}
@ -162,7 +162,7 @@ class EntityAPI{
$entity->closed = true;
$this->server->query("DELETE FROM entities WHERE EID = ".$eid.";");
if($entity->class === ENTITY_PLAYER){
$this->server->api->player->broadcastPacket($this->server->api->player->getAll($entity->level), MC_REMOVE_PLAYER, array(
$this->server->api->player->broadcastPacket($this->server->api->player->getAll(), MC_REMOVE_PLAYER, array(
"clientID" => 0,
"eid" => $entity->eid,
));