diff options
author | Darkvater <darkvater@openttd.org> | 2006-10-11 21:20:53 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-10-11 21:20:53 +0000 |
commit | e262669eb609644756a3f6cd9579791651e5b176 (patch) | |
tree | 7bffa57d62c9f8362c589b73e0bb029dd9b4daf2 /industry_cmd.c | |
parent | 1926d978884ce5d0a5b9765ec0281281dfee4409 (diff) | |
download | openttd-e262669eb609644756a3f6cd9579791651e5b176.tar.xz |
(svn r6739) -Fix (r6001): Crash on removing farmland belonging to a farm. The search would loop
around the edges causing some troubles. Also make sure that the land after
farm removal is not barren but 2/3rd grass. Better suited.
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 07f1de47b..a1abefbea 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -147,6 +147,7 @@ void DestroyIndustry(Industry *i) if (i->type == IT_FARM || i->type == IT_FARM_2) { /* Remove the farmland and convert it to regular tiles over time. */ BEGIN_TILE_LOOP(tile_cur, 42, 42, i->xy - TileDiffXY(21, 21)) { + tile_cur = TILE_MASK(tile_cur); if (IsTileType(tile_cur, MP_CLEAR) && IsClearGround(tile_cur, CLEAR_FIELDS) && GetIndustryIndexOfField(tile_cur) == i->index) { SetIndustryIndexOfField(tile_cur, INVALID_INDUSTRY); |