mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
client/server version bump; eventConnectionStateChanged
This commit is contained in:
parent
d892d320ea
commit
4b84168bda
24 changed files with 1232 additions and 1076 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue