Codechange: Don't use a global for the terrforming error tile.

This commit is contained in:
Michael Lutz
2021-12-01 00:44:57 +01:00
parent 2e39637db2
commit c521b965bd
7 changed files with 46 additions and 54 deletions

View File

@@ -755,7 +755,7 @@ CommandCost CmdBuildTunnel(DoCommandFlag flags, TileIndex start_tile, TransportT
assert(coa_index < UINT_MAX); // more than 2**32 cleared areas would be a bug in itself
coa = nullptr;
ret = Command<CMD_TERRAFORM_LAND>::Do(flags, end_tile, end_tileh & start_tileh, false);
ret = std::get<0>(Command<CMD_TERRAFORM_LAND>::Do(flags, end_tile, end_tileh & start_tileh, false));
_cleared_object_areas[(uint)coa_index].first_tile = old_first_tile;
if (ret.Failed()) return_cmd_error(STR_ERROR_UNABLE_TO_EXCAVATE_LAND);
cost.AddCost(ret);