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

@@ -1601,7 +1601,7 @@ static bool CheckIfCanLevelIndustryPlatform(TileIndex tile, DoCommandFlag flags,
}
/* This is not 100% correct check, but the best we can do without modifying the map.
* What is missing, is if the difference in height is more than 1.. */
if (Command<CMD_TERRAFORM_LAND>::Do(flags & ~DC_EXEC, tile_walk, SLOPE_N, curh <= h).Failed()) {
if (std::get<0>(Command<CMD_TERRAFORM_LAND>::Do(flags & ~DC_EXEC, tile_walk, SLOPE_N, curh <= h)).Failed()) {
cur_company.Restore();
return false;
}