Fix #12014: Remove water when area clearing ship depot (#12030)

This commit is contained in:
Loïc Guilloux
2024-02-09 18:17:08 +01:00
committed by GitHub
parent 10bcf0172e
commit b68d263d5f
2 changed files with 6 additions and 1 deletions

View File

@@ -712,6 +712,8 @@ std::tuple<CommandCost, Money> CmdClearArea(DoCommandFlag flags, TileIndex tile,
const Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? nullptr : Company::GetIfValid(_current_company);
int limit = (c == nullptr ? INT32_MAX : GB(c->clear_limit, 16, 16));
if (tile != start_tile) flags |= DC_FORCE_CLEAR_TILE;
std::unique_ptr<TileIterator> iter = TileIterator::Create(tile, start_tile, diagonal);
for (; *iter != INVALID_TILE; ++(*iter)) {
TileIndex t = *iter;