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/economy.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/economy.cpp')
-rw-r--r-- | src/economy.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index e7daf8e3d..c65d997b8 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -48,6 +48,7 @@ #include "goal_base.h" #include "story_base.h" #include "linkgraph/refresh.h" +#include "company_cmd.h" #include "economy_cmd.h" #include "vehicle_cmd.h" @@ -629,7 +630,7 @@ static void CompanyCheckBankrupt(Company *c) * player we are sure (the above check) that we are not the local * company and thus we won't be moved. */ if (!_networking || _network_server) { - DoCommandP(CMD_COMPANY_CTRL, 0, CCA_DELETE | (c->index << 16) | (CRR_BANKRUPT << 24), 0); + Command<CMD_COMPANY_CTRL>::Post(0, CCA_DELETE | (c->index << 16) | (CRR_BANKRUPT << 24), 0, {}); return; } break; |