Changeset - r10564:29e96c981acd
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-01-04 10:50:24
rubidium@openttd.org
(svn r14821) -Change [FS#2390]: make the road grids of town match, when all are using the same road layout ofcourse (cirdan)
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -1580,6 +1580,15 @@ Town *CreateRandomTown(uint attempts, To
 
	do {
 
		/* Generate a tile index not too close from the edge */
 
		TileIndex tile = RandomTile();
 
		switch (_settings_game.economy.town_layout) {
 
			case TL_2X2_GRID:
 
				tile = TileXY(TileX(tile) - TileX(tile) % 3, TileY(tile) - TileY(tile) % 3);
 
				break;
 
			case TL_3X3_GRID:
 
				tile = TileXY(TileX(tile) & ~3, TileY(tile) & ~3);
 
				break;
 
			default: break;
 
		}
 
		if (DistanceFromEdge(tile) < 20) continue;
 

	
 
		/* Make sure the tile is plain */
0 comments (0 inline, 0 general)