(svn r26625) [1.4] -Backport from trunk:

- Fix: First send packages about new company, then clients joining it to admin port [FS#6025] (r26616)
This commit is contained in:
frosch
2014-06-02 18:18:35 +00:00
committed by Sergii Pylypenko
parent fafa8753ed
commit 24ce51c3fc
2 changed files with 8 additions and 2 deletions

View File

@@ -2191,11 +2191,17 @@ void NetworkServerNewCompany(const Company *c, NetworkClientInfo *ci)
ci->client_playas = c->index;
NetworkUpdateClientInfo(ci->client_id);
NetworkSendCommand(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name, c->index);
NetworkServerSendChat(NETWORK_ACTION_COMPANY_NEW, DESTTYPE_BROADCAST, 0, "", ci->client_id, c->index + 1);
}
/* Announce new company on network. */
NetworkAdminCompanyInfo(c, true);
if (ci != NULL) {
/* ci is NULL when replaying, or for AIs. In neither case there is a client.
We need to send Admin port update here so that they first know about the new company
and then learn about a possibly joining client (see FS#6025) */
NetworkServerSendChat(NETWORK_ACTION_COMPANY_NEW, DESTTYPE_BROADCAST, 0, "", ci->client_id, c->index + 1);
}
}
#endif /* ENABLE_NETWORK */