# HG changeset patch # User belugas # Date 1187142613 0 # Node ID 9f7797968d6d9c97ed8950066448409c54eb9b20 # Parent ddf9d11e6df8607323c65f1be9a80c8e37c44c2c (svn r10904) -Fix: When using a temporary industry, make sure you do not clear some unreachable tiles upon its destruction. -Codechange: do not perform something that by all means will not change. A zero offset is really meaningless... diff -r ddf9d11e6df8 -r 9f7797968d6d src/newgrf_industrytiles.cpp --- a/src/newgrf_industrytiles.cpp Wed Aug 15 00:49:34 2007 +0000 +++ b/src/newgrf_industrytiles.cpp Wed Aug 15 01:50:13 2007 +0000 @@ -35,7 +35,7 @@ byte tile_type; bool is_same_industry; - tile = GetNearbyTile(parameter, tile); + if (parameter != 0) tile = GetNearbyTile(parameter, tile); // only perform if it is required is_same_industry = (IsTileType(tile, MP_INDUSTRY) && GetIndustryIndex(tile) == index); tile_type = GetTerrainType(tile) << 2 | (IsTileType(tile, MP_WATER) ? 1 : 0) << 1 | (is_same_industry ? 1 : 0); @@ -236,6 +236,7 @@ { Industry ind; ind.xy = 0; + ind.width = 0; ind.type = type; uint16 callback_res = GetIndustryTileCallback(CBID_INDTILE_SHAPE_CHECK, 0, 0, gfx, &ind, tile);