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/linkgraph | |
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/linkgraph')
-rw-r--r-- | src/linkgraph/linkgraphschedule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/linkgraph/linkgraphschedule.cpp b/src/linkgraph/linkgraphschedule.cpp index c4fc2d5f9..0a6b89150 100644 --- a/src/linkgraph/linkgraphschedule.cpp +++ b/src/linkgraph/linkgraphschedule.cpp @@ -16,6 +16,7 @@ #include "../framerate_type.h" #include "../command_func.h" #include "../network/network.h" +#include "../misc_cmd.h" #include "../safeguards.h" @@ -173,7 +174,7 @@ void StateGameLoop_LinkGraphPauseControl() if (_pause_mode & PM_PAUSED_LINK_GRAPH) { /* We are paused waiting on a job, check the job every tick. */ if (!LinkGraphSchedule::instance.IsJoinWithUnfinishedJobDue()) { - DoCommandP(CMD_PAUSE, 0, PM_PAUSED_LINK_GRAPH, 0); + Command<CMD_PAUSE>::Post(0, PM_PAUSED_LINK_GRAPH, 0, {}); } } else if (_pause_mode == PM_UNPAUSED && _date_fract == LinkGraphSchedule::SPAWN_JOIN_TICK - 2 && @@ -181,7 +182,7 @@ void StateGameLoop_LinkGraphPauseControl() LinkGraphSchedule::instance.IsJoinWithUnfinishedJobDue()) { /* Perform check two _date_fract ticks before we would join, to make * sure it also works in multiplayer. */ - DoCommandP(CMD_PAUSE, 0, PM_PAUSED_LINK_GRAPH, 1); + Command<CMD_PAUSE>::Post(0, PM_PAUSED_LINK_GRAPH, 1, {}); } } |