Fixed disconnection

This commit is contained in:
Shoghi Cervantes 2013-08-20 02:15:18 +02:00
parent bf1b00f0e6
commit 19b3ac4a99

View File

@ -274,8 +274,11 @@ class Player{
$this->recoveryQueue = array(); $this->recoveryQueue = array();
$this->receiveQueue = array(); $this->receiveQueue = array();
$this->resendQueue = array(); $this->resendQueue = array();
$this->server->interface->stopChunked($this->CID); $this->server->interface->stopChunked($this->CID);
$this->server->api->player->remove($this->CID); $this->server->api->player->remove($this->CID);
if($msg === true and $this->username != ""){
$this->server->api->chat->broadcast($this->username." left the game");
}
console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason); console("[INFO] \x1b[33m".$this->username."\x1b[0m[/".$this->ip.":".$this->port."] logged out due to ".$reason);
} }
} }
@ -1217,9 +1220,9 @@ class Player{
if($this->spawned !== false){ if($this->spawned !== false){
break; break;
} }
$this->spawned = true;
$this->server->api->player->spawnAllPlayers($this); $this->server->api->player->spawnAllPlayers($this);
$this->server->api->player->spawnToAllPlayers($this); $this->server->api->player->spawnToAllPlayers($this);
$this->spawned = true;
$this->server->api->entity->spawnAll($this); $this->server->api->entity->spawnAll($this);
$this->server->api->entity->spawnToAll($this->entity); $this->server->api->entity->spawnToAll($this->entity);