1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Looks like everything works

This commit is contained in:
nordsoft 2022-09-28 23:38:41 +04:00
parent 7ee4fca120
commit 2eb497b477
2 changed files with 10 additions and 2 deletions

@ -514,6 +514,8 @@ void CServerHandler::sendStartGame(bool allowOnlyAI) const
* si = * lsg.initializedStartInfo; * si = * lsg.initializedStartInfo;
} }
sendLobbyPack(lsg); sendLobbyPack(lsg);
c->enterLobbyConnectionMode();
c->disableStackSendingByID();
} }
void CServerHandler::startGameplay(CGameState * gameState) void CServerHandler::startGameplay(CGameState * gameState)

@ -230,10 +230,16 @@ bool CVCMIServer::prepareToStartGame()
state = EServerState::LOBBY; state = EServerState::LOBBY;
// FIXME: dirry hack to make sure old CGameHandler::run is finished // FIXME: dirry hack to make sure old CGameHandler::run is finished
boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
for(auto c : connections)
{
c->enterLobbyConnectionMode();
c->disableStackSendingByID();
}
} }
if(!gh) //if(!gh)
gh = std::make_shared<CGameHandler>(this); gh = std::make_shared<CGameHandler>(this);
switch(si->mode) switch(si->mode)
{ {
case StartInfo::CAMPAIGN: case StartInfo::CAMPAIGN: