summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
committerrubidium <rubidium@openttd.org>2008-12-28 14:37:19 +0000
commit87e5a8b52bf2f200467d65c1e17fd79548d31129 (patch)
tree36bbbb5d389d41119ee184607bc012666dda7812 /src/company_cmd.cpp
parent53679122af1e0a68bbe4e9c1f73526dd7e118df6 (diff)
downloadopenttd-87e5a8b52bf2f200467d65c1e17fd79548d31129.tar.xz
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}
}