Changeset - r17888:a1750e642291
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2011-07-30 12:17:46
rubidium@openttd.org
(svn r22697) -Fix [FS#4694-ish]: when building a house it could be built at the wrong place if multitile houses failed some tests
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/town_cmd.cpp
Show inline comments
 
@@ -2128,8 +2128,16 @@ static bool BuildTownHouse(Town *t, Tile
 
	}
 

	
 
	uint maxz = GetTileMaxZ(tile);
 
	TileIndex baseTile = tile;
 

	
 
	while (probability_max > 0) {
 
		/* Building a multitile building can change the location of tile.
 
		 * The building would still be built partially on that tile, but
 
		 * its nothern tile would be elsewere. However, if the callback
 
		 * fails we would be basing further work from the changed tile.
 
		 * So a next 1x1 tile building could be built on the wrong tile. */
 
		tile = baseTile;
 

	
 
		uint r = RandomRange(probability_max);
 
		uint i;
 
		for (i = 0; i < num; i++) {
0 comments (0 inline, 0 general)