(svn r21732) -Fix (r21728): show the "proper" error that the landscaping limit is reached instead of "already flat"

This commit is contained in:
rubidium 2011-01-05 08:33:21 +00:00
parent 4cc2d71d6d
commit 68412eebec
1 changed files with 1 additions and 0 deletions

View File

@ -422,6 +422,7 @@ CommandCost CmdLevelLand(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
const Company *c = Company::GetIfValid(_current_company);
int limit = (c == NULL ? INT32_MAX : GB(c->terraform_limit, 16, 16));
if (limit == 0) return_cmd_error(STR_ERROR_TERRAFORM_LIMIT_REACHED);
TileArea ta(tile, p1);
TileIterator *iter = HasBit(p2, 0) ? (TileIterator *)new DiagonalTileIterator(tile, p1) : new OrthogonalTileIterator(ta);