Merge branch 'master' into jgrpp
This commit is contained in:
@@ -581,7 +581,14 @@ Company *DoStartupNewCompany(DoStartupNewCompanyFlag flags, CompanyID company)
|
||||
c->avail_railtypes = GetCompanyRailtypes(c->index);
|
||||
c->avail_roadtypes = GetCompanyRoadTypes(c->index);
|
||||
c->inaugurated_year = _cur_year;
|
||||
RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false, false); // create a random company manager face
|
||||
|
||||
/* If starting a player company in singleplayer and a favorite company manager face is selected, choose it. Otherwise, use a random face.
|
||||
* In a network game, we'll choose the favorite face later in CmdCompanyCtrl to sync it to all clients. */
|
||||
if (_company_manager_face != 0 && !is_ai && !_networking) {
|
||||
c->face = _company_manager_face;
|
||||
} else {
|
||||
RandomCompanyManagerFaceBits(c->face, (GenderEthnicity)Random(), false, false);
|
||||
}
|
||||
|
||||
SetDefaultCompanySettings(c->index);
|
||||
ClearEnginesHiddenFlagOfCompany(c->index);
|
||||
@@ -871,6 +878,10 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
||||
NetworkChangeCompanyPassword(_local_company, _settings_client.network.default_company_pass);
|
||||
}
|
||||
|
||||
/* In network games, we need to try setting the company manager face here to sync it to all clients.
|
||||
* If a favorite company manager face is selected, choose it. Otherwise, use a random face. */
|
||||
if (_company_manager_face != 0) DoCommandP(0, 0, _company_manager_face, CMD_SET_COMPANY_MANAGER_FACE);
|
||||
|
||||
/* Now that we have a new company, broadcast our company settings to
|
||||
* all clients so everything is in sync */
|
||||
SyncCompanySettings();
|
||||
|
Reference in New Issue
Block a user