1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

One step forward

This commit is contained in:
nordsoft
2022-10-04 02:25:22 +04:00
parent 512cf014aa
commit b91bb41a80
4 changed files with 12 additions and 5 deletions

View File

@@ -52,8 +52,10 @@ void LobbyClientConnected::applyOnServerAfterAnnounce(CVCMIServer * srv)
// FIXME: we need to avoid senting something to client that not yet get answer for LobbyClientConnected
// Until UUID set we only pass LobbyClientConnected to this client
c->uuid = uuid;
srv->updateAndPropagateLobbyState();
if(srv->state == EServerState::GAMEPLAY)
{
//immediately start game
std::unique_ptr<LobbyStartGame> startGameForReconnectedPlayer(new LobbyStartGame);
startGameForReconnectedPlayer->initializedStartInfo = srv->si;
@@ -61,10 +63,6 @@ void LobbyClientConnected::applyOnServerAfterAnnounce(CVCMIServer * srv)
startGameForReconnectedPlayer->clientId = c->connectionID;
srv->addToAnnounceQueue(std::move(startGameForReconnectedPlayer));
}
else
{
srv->updateAndPropagateLobbyState();
}
}
bool LobbyClientDisconnected::checkClientPermissions(CVCMIServer * srv) const