From 7e6ccf3a0a1c42c978dff5f4d59e4e0052af70f1 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 10 Jan 2011 21:58:05 +0000 Subject: (svn r21767) -Fix [FS#4397]: don't limit tile clearing during bankruptcy --- src/landscape.cpp | 4 ++-- 1 file 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); -- cgit v1.2.3-70-g09d2