improved code for automatic joining of persistent games; disconnecting + reconnecting works as it should with ISL

This commit is contained in:
Max-Wilhelm Bruker
2012-03-18 21:57:21 +01:00
parent 5db0fcd6ae
commit af8e357487
13 changed files with 215 additions and 135 deletions

View File

@@ -1578,3 +1578,11 @@ void Server_Player::setUserInterface(Server_AbstractUserInterface *_userInterfac
ges.enqueueGameEvent(event, playerId);
ges.sendToGame(game);
}
void Server_Player::disconnectClient()
{
if (!(userInfo->user_level() & ServerInfo_User::IsRegistered) || spectator)
game->removePlayer(this);
else
setUserInterface(0);
}