mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
improved code for automatic joining of persistent games; disconnecting + reconnecting works as it should with ISL
This commit is contained in:
parent
5db0fcd6ae
commit
af8e357487
13 changed files with 215 additions and 135 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue