mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-27 13:14:13 -08:00
client/server version bump; eventConnectionStateChanged
This commit is contained in:
@@ -46,8 +46,10 @@ void Server_ProtocolHandler::prepareDestroy()
|
||||
|
||||
if ((authState == UnknownUser) || p->getSpectator())
|
||||
g->removePlayer(p);
|
||||
else
|
||||
else {
|
||||
p->setProtocolHandler(0);
|
||||
g->postConnectionStatusUpdate(p, false);
|
||||
}
|
||||
}
|
||||
gameListMutex.unlock();
|
||||
|
||||
@@ -392,6 +394,7 @@ ResponseCode Server_ProtocolHandler::cmdJoinRoom(Command_JoinRoom *cmd, CommandC
|
||||
for (int j = 0; j < gamePlayers.size(); ++j)
|
||||
if (gamePlayers[j]->getUserInfo()->getName() == userInfo->getName()) {
|
||||
gamePlayers[j]->setProtocolHandler(this);
|
||||
game->postConnectionStatusUpdate(gamePlayers[j], true);
|
||||
games.insert(game->getGameId(), QPair<Server_Game *, Server_Player *>(game, gamePlayers[j]));
|
||||
|
||||
enqueueProtocolItem(new Event_GameJoined(game->getGameId(), game->getDescription(), gamePlayers[j]->getPlayerId(), gamePlayers[j]->getSpectator(), game->getSpectatorsCanTalk(), game->getSpectatorsSeeEverything(), true));
|
||||
|
||||
Reference in New Issue
Block a user