diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-31 19:39:09 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 0f64ee5ce1548d9cda69917f27c5b1a3cb91823d (patch) | |
tree | 161f0e6ac300e604de61b8203b5a58279637f9eb /src/main_gui.cpp | |
parent | e740c24eb7a90bc771f5976d64d80639ee7576e5 (diff) | |
download | openttd-0f64ee5ce1548d9cda69917f27c5b1a3cb91823d.tar.xz |
Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index a4bec45d5..847d32845 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -33,6 +33,7 @@ #include "guitimer_func.h" #include "error.h" #include "news_gui.h" +#include "misc_cmd.h" #include "saveload/saveload.h" @@ -326,7 +327,7 @@ struct MainWindow : Window case GHK_MONEY: // Gimme money /* You can only cheat for money in singleplayer mode. */ - if (!_networking) DoCommandP(CMD_MONEY_CHEAT, 0, 10000000, 0); + if (!_networking) Command<CMD_MONEY_CHEAT>::Post(0, 10000000, 0, {}); break; case GHK_UPDATE_COORDS: // Update the coordinates of all station signs |