On load, use previous local company or first usable company

Instead of always using the first company slot
This commit is contained in:
Jonathan G Rennison
2020-09-20 17:36:36 +01:00
parent 9af2c258fa
commit 4763f441f6
8 changed files with 46 additions and 6 deletions

View File

@@ -717,7 +717,7 @@ static void NetworkInitGameInfo()
/* There should be always space for the server. */
assert(NetworkClientInfo::CanAllocateItem());
NetworkClientInfo *ci = new NetworkClientInfo(CLIENT_ID_SERVER);
ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : COMPANY_FIRST;
ci->client_playas = _network_dedicated ? COMPANY_SPECTATOR : GetDefaultLocalCompany();
strecpy(ci->client_name, _settings_client.network.client_name, lastof(ci->client_name));
}