Mercurial > hg > openttd
changeset 16061:eea3c81622fe draft
(svn r20754) -Fix [FS#4112]: assert when an industry previously build on water was flooded because it's grf changed/is missing
author | yexo <yexo@openttd.org> |
---|---|
date | Mon, 06 Sep 2010 15:23:16 +0000 |
parents | f814822627f3 |
children | b5824161b8e3 |
files | src/industry_cmd.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -785,6 +785,12 @@ { if (IsTileOnWater(tile)) TileLoop_Water(tile); + /* Normally this doesn't happen, but if an industry NewGRF is removed + * an industry that was previously build on water can now be flooded. + * If this happens the tile is no longer an industry tile after + * returning from TileLoop_Water. */ + if (!IsTileType(tile, MP_INDUSTRY)) return; + TriggerIndustryTile(tile, INDTILE_TRIGGER_TILE_LOOP); if (!IsIndustryCompleted(tile)) {