summaryrefslogtreecommitdiff
path: root/src/main_gui.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/main_gui.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/main_gui.cpp')
-rw-r--r--src/main_gui.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp
index ca4a0e736..905aa8458 100644
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -63,8 +63,6 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2)
void HandleOnEditText(const char *str)
{
- _cmd_text = str;
-
switch (_rename_what) {
#ifdef ENABLE_NETWORK
case 3: { // Give money, you can only give money in excess of loan
@@ -74,7 +72,7 @@ void HandleOnEditText(const char *str)
uint32 money_c = Clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0
/* Give 'id' the money, and substract it from ourself */
- DoCommandP(0, money_c, _rename_id, CcGiveMoney, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS));
+ DoCommandP(0, money_c, _rename_id, CMD_GIVE_MONEY | CMD_MSG(STR_INSUFFICIENT_FUNDS), CcGiveMoney, str);
} break;
#endif /* ENABLE_NETWORK */
default: NOT_REACHED();
@@ -271,7 +269,7 @@ struct MainWindow : Window
#ifdef ENABLE_NETWORK
if (!_networking || !_network_server || !_settings_client.network.server_advertise)
#endif /* ENABLE_NETWORK */
- DoCommandP(0, 10000000, 0, NULL, CMD_MONEY_CHEAT);
+ DoCommandP(0, 10000000, 0, CMD_MONEY_CHEAT);
break;
case '2' | WKC_ALT: // Update the coordinates of all station signs