mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 13:23:46 +00:00
(svn r18938) -Fix: Industrylayout's special water tile check did not properly check for crossing north border of map. Also don't consider MP_VOID tiles as water.
This commit is contained in:
parent
6be4560528
commit
294bc14652
@ -1282,12 +1282,9 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
|
||||
|
||||
do {
|
||||
IndustryGfx gfx = GetTranslatedIndustryTileID(it->gfx);
|
||||
if (TileX(tile) + it->ti.x >= MapSizeX()) return false;
|
||||
if (TileY(tile) + it->ti.y >= MapSizeY()) return false;
|
||||
TileIndex cur_tile = tile + ToTileIndexDiff(it->ti);
|
||||
TileIndex cur_tile = TileAddWrap(tile, it->ti.x, it->ti.y);
|
||||
|
||||
if (!IsValidTile(cur_tile)) {
|
||||
if (gfx == GFX_WATERTILE_SPECIALCHECK) continue;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user