1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Minor changes

This commit is contained in:
nordsoft
2022-10-27 01:39:57 +04:00
parent 1455c65e1a
commit 6eb43d3834
5 changed files with 23 additions and 11 deletions

View File

@@ -170,8 +170,12 @@ void CVCMIServer::run()
#endif
startAsyncAccept();
if(!remoteConnectionsThread)
if(!remoteConnectionsThread && !settings["server"]["lobby"].isNull() && settings["server"]["lobby"].Bool())
{
remoteConnectionsThread = vstd::make_unique<boost::thread>(&CVCMIServer::establishRemoteConnections, this);
Settings node = settings.write["server"]["lobby"];
node->Bool() = false;
}
#if defined(VCMI_ANDROID)
CAndroidVMHelper vmHelper;
@@ -199,12 +203,6 @@ void CVCMIServer::run()
void CVCMIServer::establishRemoteConnections()
{
if(settings["server"]["lobby"].isNull() || !settings["server"]["lobby"].Bool())
return;
Settings node = settings.write["server"];
node["lobby"].Bool() = false;
uuid = settings["server"]["host"]["uuid"].String();
int numOfConnections = settings["server"]["host"]["connections"].Integer();
auto address = settings["server"]["server"].String();