diff options
author | rubidium <rubidium@openttd.org> | 2011-01-10 21:58:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-01-10 21:58:05 +0000 |
commit | 7e6ccf3a0a1c42c978dff5f4d59e4e0052af70f1 (patch) | |
tree | 81b28d627699e7e78aa75b56fcf495e77a214490 | |
parent | 60874f88d03545e1c2a17afca4fff208c879cedc (diff) | |
download | openttd-7e6ccf3a0a1c42c978dff5f4d59e4e0052af70f1.tar.xz |
(svn r21767) -Fix [FS#4397]: don't limit tile clearing during bankruptcy
-rw-r--r-- | src/landscape.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/landscape.cpp b/src/landscape.cpp index 8a31039d1..42293622c 100644 --- a/src/landscape.cpp +++ b/src/landscape.cpp @@ -617,7 +617,7 @@ CommandCost CmdLandscapeClear(TileIndex tile, DoCommandFlag flags, uint32 p1, ui cost.AddCost(GetWaterClass(tile) == WATER_CLASS_CANAL ? _price[PR_CLEAR_CANAL] : _price[PR_CLEAR_WATER]); } - Company *c = (flags & DC_AUTO) ? NULL : Company::GetIfValid(_current_company); + Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? NULL : Company::GetIfValid(_current_company); if (c != NULL && (int)GB(c->clear_limit, 16, 16) < 1) { return_cmd_error(STR_ERROR_CLEARING_LIMIT_REACHED); } @@ -665,7 +665,7 @@ CommandCost CmdClearArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 CommandCost last_error = CMD_ERROR; bool had_success = false; - const Company *c = (flags & DC_AUTO) ? NULL : Company::GetIfValid(_current_company); + const Company *c = (flags & (DC_AUTO | DC_BANKRUPT)) ? NULL : Company::GetIfValid(_current_company); int limit = (c == NULL ? INT32_MAX : GB(c->clear_limit, 16, 16)); TileArea ta(tile, p1); |