From 2eb497b477610889b1e5dc28e17d19576c21799c Mon Sep 17 00:00:00 2001 From: nordsoft Date: Wed, 28 Sep 2022 23:38:41 +0400 Subject: [PATCH] Looks like everything works --- client/CServerHandler.cpp | 2 ++ server/CVCMIServer.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/CServerHandler.cpp b/client/CServerHandler.cpp index 9e31e2148..a51dedc00 100644 --- a/client/CServerHandler.cpp +++ b/client/CServerHandler.cpp @@ -514,6 +514,8 @@ void CServerHandler::sendStartGame(bool allowOnlyAI) const * si = * lsg.initializedStartInfo; } sendLobbyPack(lsg); + c->enterLobbyConnectionMode(); + c->disableStackSendingByID(); } void CServerHandler::startGameplay(CGameState * gameState) diff --git a/server/CVCMIServer.cpp b/server/CVCMIServer.cpp index 6015608c7..5d392990e 100644 --- a/server/CVCMIServer.cpp +++ b/server/CVCMIServer.cpp @@ -230,10 +230,16 @@ bool CVCMIServer::prepareToStartGame() state = EServerState::LOBBY; // FIXME: dirry hack to make sure old CGameHandler::run is finished boost::this_thread::sleep(boost::posix_time::milliseconds(1000)); + + for(auto c : connections) + { + c->enterLobbyConnectionMode(); + c->disableStackSendingByID(); + } } - if(!gh) - gh = std::make_shared(this); + //if(!gh) + gh = std::make_shared(this); switch(si->mode) { case StartInfo::CAMPAIGN: