Changeset - r3471:eda2811cbf6b
[Not reviewed]
master
0 1 0
celestar - 19 years ago 2006-04-07 09:37:04
celestar@openttd.org
(svn r4316) -Codechange: finished r4257 (forgot one variable there)
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
station_cmd.c
Show inline comments
 
@@ -1477,13 +1477,13 @@ static const byte _airport_sections_inte
 

	
 
// Heliport
 
static const byte _airport_sections_heliport[] = {
 
	66,
 
};
 

	
 
static const byte * const _airport_map5_tiles[] = {
 
static const byte * const _airport_sections[] = {
 
	_airport_sections_country,				// Country Airfield (small)
 
	_airport_sections_town,						// City Airport (large)
 
	_airport_sections_heliport,				// Heliport
 
	_airport_sections_metropolitan,   // Metropolitain Airport (large)
 
	_airport_sections_international,	// International Airport (xlarge)
 
};
 
@@ -1503,13 +1503,13 @@ int32 CmdBuildAirport(int x, int y, uint
 
	int w, h;
 
	bool airport_upgrade = true;
 

	
 
	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
 

	
 
	/* Check if a valid, buildable airport was chosen for construction */
 
	if (p1 > lengthof(_airport_map5_tiles) || !HASBIT(GetValidAirports(), p1)) return CMD_ERROR;
 
	if (p1 > lengthof(_airport_sections) || !HASBIT(GetValidAirports(), p1)) return CMD_ERROR;
 

	
 
	tile = TileVirtXY(x, y);
 

	
 
	if (!(flags & DC_NO_TOWN_RATING) && !CheckIfAuthorityAllows(tile))
 
		return CMD_ERROR;
 

	
 
@@ -1598,13 +1598,13 @@ int32 CmdBuildAirport(int x, int y, uint
 
		 * 1. airport is upgraded
 
		 * 2. airport is added to existing station (unfortunately unavoideable)
 
		 */
 
		if (airport_upgrade) UpdateAirplanesOnNewStation(st);
 

	
 
		{
 
			const byte *b = _airport_map5_tiles[p1];
 
			const byte *b = _airport_sections[p1];
 

	
 
			BEGIN_TILE_LOOP(tile_cur, w, h, tile) {
 
				MakeAirport(tile_cur, st->owner, st->index, *b++);
 
			} END_TILE_LOOP(tile_cur, w, h, tile)
 
		}
 

	
0 comments (0 inline, 0 general)