1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00
This commit is contained in:
Ivan Savenko
2024-02-03 22:59:56 +02:00
parent 1b6ac1052a
commit 7dee24edae
13 changed files with 74 additions and 83 deletions

View File

@ -139,9 +139,9 @@ CServerHandler::~CServerHandler()
}
CServerHandler::CServerHandler()
: applier(std::make_unique<CApplier<CBaseForLobbyApply>>())
: networkHandler(INetworkHandler::createHandler())
, lobbyClient(std::make_unique<GlobalLobbyClient>())
, networkHandler(INetworkHandler::createHandler())
, applier(std::make_unique<CApplier<CBaseForLobbyApply>>())
, threadNetwork(&CServerHandler::threadRunNetwork, this)
, state(EClientState::NONE)
, campaignStateToSend(nullptr)
@ -187,6 +187,11 @@ GlobalLobbyClient & CServerHandler::getGlobalLobby()
return *lobbyClient;
}
INetworkHandler & CServerHandler::getNetworkHandler()
{
return *networkHandler;
}
void CServerHandler::startLocalServerAndConnect(bool connectToLobby)
{
if(threadRunLocalServer.joinable())