Merge remote-tracking branch 'upstream/master'

This commit is contained in:
dP
2024-02-19 12:16:07 +05:30
183 changed files with 9534 additions and 5696 deletions
+10 -3
View File
@@ -20,6 +20,7 @@
#include "network/network_base.h"
#include "network/network_admin.h"
#include "ai/ai.hpp"
#include "ai/ai_config.hpp"
#include "company_manager_face.h"
#include "window_func.h"
#include "strings_func.h"
@@ -896,6 +897,11 @@ CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID
break;
}
/* Send new companies, before potentially setting the password. Otherwise,
* the password update could be sent when the company is not yet known. */
NetworkAdminCompanyNew(c);
NetworkServerNewCompany(c, ci);
/* This is the client (or non-dedicated server) who wants a new company */
if (client_id == _network_own_client_id) {
assert(_local_company == COMPANY_SPECTATOR);
@@ -915,8 +921,6 @@ CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID
UpdateAllTownVirtCoords(); // CityMania (for colouring towns)
MarkWholeScreenDirty();
}
NetworkServerNewCompany(c, ci);
break;
}
@@ -932,7 +936,10 @@ CommandCost CmdCompanyCtrl(DoCommandFlag flags, CompanyCtrlAction cca, CompanyID
assert(company_id == INVALID_COMPANY || !Company::IsValidID(company_id));
Company *c = DoStartupNewCompany(true, company_id);
if (c != nullptr) NetworkServerNewCompany(c, nullptr);
if (c != nullptr) {
NetworkAdminCompanyNew(c);
NetworkServerNewCompany(c, nullptr);
}
break;
}