Fixed incorrect player count at login

This commit is contained in:
Shoghi Cervantes
2013-06-12 00:06:09 +02:00
parent 5afd26b1b6
commit 2957f35194

View File

@ -469,6 +469,7 @@ class PocketMinecraftServer{
$port = $data[2]; $port = $data[2];
$MTU = $data[3]; $MTU = $data[3];
$clientID = $data[4]; $clientID = $data[4];
if(count($this->server->clients) < $this->server->maxClients){
$this->clients[$CID] = new Player($clientID, $packet["ip"], $packet["port"], $MTU); //New Session! $this->clients[$CID] = new Player($clientID, $packet["ip"], $packet["port"], $MTU); //New Session!
$this->send(0x08, array( $this->send(0x08, array(
RAKNET_MAGIC, RAKNET_MAGIC,
@ -477,6 +478,7 @@ class PocketMinecraftServer{
$data[3], $data[3],
0, 0,
), false, $packet["ip"], $packet["port"]); ), false, $packet["ip"], $packet["port"]);
}
break; break;
} }
} }