From 87e5a8b52bf2f200467d65c1e17fd79548d31129 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 28 Dec 2008 14:37:19 +0000 Subject: (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. --- src/company_cmd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/company_cmd.cpp') diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index 63fb3dc44..3dff0984a 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -564,7 +564,7 @@ static void MaybeStartNewCompany() )) { /* Send a command to all clients to start up a new AI. * Works fine for Multiplayer and Singleplayer */ - DoCommandP(0, 1, 0, NULL, CMD_COMPANY_CTRL); + DoCommandP(0, 1, 0, CMD_COMPANY_CTRL); } /* The next AI starts like the difficulty setting said, with +2 month max */ @@ -645,7 +645,7 @@ void CompaniesYearlyLoop() * if p1 = 5, then * - p2 = enable renew_keep_length */ -CommandCost CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) +CommandCost CmdSetAutoReplace(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text) { if (!IsValidCompanyID(_current_company)) return CMD_ERROR; @@ -788,7 +788,7 @@ void CompanyNewsInformation::FillData(const Company *c, const Company *other) * @arg - network_server.c:838 DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_COMMAND)@n * @arg - network_client.c:536 DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_MAP) from where the map has been received */ -CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) +CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2, const char *text) { if (flags & DC_EXEC) _current_company = OWNER_NONE; @@ -848,6 +848,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) (_settings_client.gui.autorenew << 15 ) | (_settings_client.gui.autorenew_months << 16) | 4, _settings_client.gui.autorenew_money, CMD_SET_AUTOREPLACE, + NULL, NULL ); @@ -876,9 +877,8 @@ CommandCost CmdCompanyCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) * TODO: Perhaps this could be improved by when the client is ready * with joining to let it send itself the command, and not the server? * For example in network_client.c:534? */ - _cmd_text = ci->client_name; _local_company = ci->client_playas; - NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL); + NetworkSend_Command(0, 0, 0, CMD_RENAME_PRESIDENT, NULL, ci->client_name); _local_company = company_backup; } } -- cgit v1.2.3-54-g00ecf