Fixed spawning despawned entities

This commit is contained in:
Shoghi Cervantes Pueyo 2013-04-13 14:21:58 +02:00
parent 4867533ab7
commit 199fbb644b

View File

@ -439,11 +439,14 @@ class Entity extends stdClass{
if(!($player instanceof Player)){
$player = $this->server->api->player->get($player);
}
if($player->eid === $this->eid){
if($player->eid === $this->eid or $this->closed !== false){
return false;
}
switch($this->class){
case ENTITY_PLAYER:
if($this->player->connected !== true){
return false;
}
$player->dataPacket(MC_ADD_PLAYER, array(
"clientID" => 0,/*$this->player->clientID,*/
"username" => $this->player->username,