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/train_cmd.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/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index b060ecdba..a86e835bd 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -35,6 +35,7 @@ #include "newgrf_debug.h" #include "framerate_type.h" #include "train_cmd.h" +#include "misc_cmd.h" #include "table/strings.h" #include "table/train_sprites.h" @@ -87,7 +88,7 @@ void CheckTrainsLengths() if (!_networking && first) { first = false; - DoCommandP(CMD_PAUSE, 0, PM_PAUSED_ERROR, 1); + Command<CMD_PAUSE>::Post(0, PM_PAUSED_ERROR, 1, {}); } /* Break so we warn only once for each train. */ break; |