diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-11-30 22:59:23 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 57b82e2e99aa30a649d1fd80f192ccf5338dc7c4 (patch) | |
tree | b059cf0f22ab065166dd3b0391772b6e83aef49b /src/autoreplace_cmd.cpp | |
parent | 3e85e833a707e6b781d00eae09c9465bacbf1d69 (diff) | |
download | openttd-57b82e2e99aa30a649d1fd80f192ccf5338dc7c4.tar.xz |
Codechange: Don't use globals for story/goal/sign/group command proc return values.
Diffstat (limited to 'src/autoreplace_cmd.cpp')
-rw-r--r-- | src/autoreplace_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/autoreplace_cmd.cpp b/src/autoreplace_cmd.cpp index f2ef317f0..9fef03839 100644 --- a/src/autoreplace_cmd.cpp +++ b/src/autoreplace_cmd.cpp @@ -405,7 +405,7 @@ static CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head, if (cost.Succeeded() && old_head != new_head) cost.AddCost(Command<CMD_CLONE_ORDER>::Do(DC_EXEC, CO_SHARE, new_head->index, old_head->index)); /* Copy group membership */ - if (cost.Succeeded() && old_head != new_head) cost.AddCost(Command<CMD_ADD_VEHICLE_GROUP>::Do(DC_EXEC, old_head->group_id, new_head->index, false)); + if (cost.Succeeded() && old_head != new_head) cost.AddCost(std::get<0>(Command<CMD_ADD_VEHICLE_GROUP>::Do(DC_EXEC, old_head->group_id, new_head->index, false))); /* Perform start/stop check whether the new vehicle suits newgrf restrictions etc. */ if (cost.Succeeded()) { |