mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 21:19:10 +00:00
(svn r18784) -Codechange: make NetworkSend_Command accept a company instead of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company.
This commit is contained in:
@@ -643,7 +643,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP)
|
||||
* the server will give us a client-id and let us in */
|
||||
_network_join_status = NETWORK_JOIN_STATUS_REGISTERING;
|
||||
ShowJoinStatusWindow();
|
||||
NetworkSend_Command(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL);
|
||||
NetworkSend_Command(0, 0, 0, CMD_COMPANY_CTRL, NULL, NULL, _local_company);
|
||||
}
|
||||
} else {
|
||||
/* take control over an existing company */
|
||||
|
@@ -78,13 +78,14 @@ void NetworkAddCommandQueue(CommandPacket cp, NetworkClientSocket *cs)
|
||||
* @param cmd The command to execute (a CMD_* value)
|
||||
* @param callback A callback function to call after the command is finished
|
||||
* @param text The text to pass
|
||||
* @param company The company that wants to send the command
|
||||
*/
|
||||
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text)
|
||||
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback, const char *text, CompanyID company)
|
||||
{
|
||||
assert((cmd & CMD_FLAGS_MASK) == 0);
|
||||
|
||||
CommandPacket c;
|
||||
c.company = _local_company;
|
||||
c.company = company;
|
||||
c.next = NULL;
|
||||
c.tile = tile;
|
||||
c.p1 = p1;
|
||||
|
Reference in New Issue
Block a user