File diff r4076:ac684fc44bc2 → r4077:259c4c4aacad
town_cmd.c
Show inline comments
 
@@ -688,27 +688,27 @@ static int GrowTownAtRoad(Town *t, TileI
 
		// and return if no more road blocks available
 
		CLRBIT(mask, (block ^ 2));
 
		if (mask == 0)
 
			return _grow_town_result;
 

	
 
		// Select a random bit from the blockmask, walk a step
 
		// and continue the search from there.
 
		do block = Random() & 3; while (!HASBIT(mask,block));
 
		tile += ToTileIndexDiff(_roadblock_tileadd[block]);
 

	
 
		if (IsTileType(tile, MP_STREET)) {
 
			/* Don't allow building over roads of other cities */
 
			if (IsTileOwner(tile, OWNER_TOWN) && GetTownByTile(tile) != t)
 
			if (IsTileOwner(tile, OWNER_TOWN) && GetTownByTile(tile) != t) {
 
				_grow_town_result = -1;
 
			else if (_game_mode == GM_EDITOR) {
 
			} else if (_game_mode == GM_EDITOR) {
 
				/* If we are in the SE, and this road-piece has no town owner yet, it just found an
 
				*  owner :) (happy happy happy road now) */
 
				SetTileOwner(tile, OWNER_TOWN);
 
				SetTownIndex(tile, t->index);
 
			}
 
		}
 

	
 
		// Max number of times is checked.
 
	} while (--_grow_town_result >= 0);
 

	
 
	return (_grow_town_result == -2);
 
}