forked from mirror/OpenTTD
(svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map.
This commit is contained in:
@@ -759,7 +759,7 @@ static bool IsNeighborRoadTile(TileIndex tile, const DiagDirection dir, uint dis
|
||||
if (pos & 2) cur += tid_lt[2];
|
||||
|
||||
cur = (uint)(pos / 4) * cur; // Multiply for the fitting distance
|
||||
if (GetTownRoadBits(TILE_ADD(tile, cur)) & DiagDirToRoadBits((pos & 2) ? dir : ReverseDiagDir(dir))) return true;
|
||||
if (IsValidTile(tile + TileXY(TileX(cur) / 2, TileY(cur) / 2)) && IsValidTile(tile + cur) && GetTownRoadBits(TILE_ADD(tile, cur)) & DiagDirToRoadBits((pos & 2) ? dir : ReverseDiagDir(dir))) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1135,6 +1135,8 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t
|
||||
/* Don't walk into water. */
|
||||
if (IsWaterTile(house_tile)) return;
|
||||
|
||||
if (!IsValidTile(house_tile) || !IsValidTile(house_tile + TileOffsByDiagDir(target_dir))) return;
|
||||
|
||||
switch (t1->GetActiveLayout()) {
|
||||
default: NOT_REACHED();
|
||||
|
||||
|
Reference in New Issue
Block a user