Changeset - r14255:6e7e24be6c46
[Not reviewed]
master
0 2 0
yexo - 14 years ago 2010-01-15 21:00:46
yexo@openttd.org
(svn r18816) -Fix (r18807): getting the catchment area of oilrigs triggered an assert
2 files changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/airport.cpp
Show inline comments
 
@@ -116,24 +116,25 @@ enum AirportTiles {
 
	APT_HELIPAD_3_FENCE_NW     = 135,
 
	APT_LOW_BUILDING           = 136,
 
	APT_APRON_FENCE_NE_SE      = 137,
 
	APT_APRON_HALF_EAST        = 138,
 
	APT_APRON_HALF_WEST        = 139,
 
	APT_GRASS_FENCE_NE_FLAG_2  = 140,
 
	/* 141-143 used for flag animation */
 
};
 

	
 
#include "table/airport_defaults.h"
 

	
 
AirportSpec AirportSpec::dummy = {NULL, NULL, 0, 0, 0, 0, 0, MIN_YEAR, MIN_YEAR};
 
AirportSpec AirportSpec::oilrig = {NULL, NULL, 0, 1, 1, 0, 4, MIN_YEAR, MIN_YEAR};
 

	
 
/* Uncomment this to print out a full report of the airport-structure
 
 * You should either use
 
 * - true: full-report, print out every state and choice with string-names
 
 * OR
 
 * - false: give a summarized report which only shows current and next position */
 
//#define DEBUG_AIRPORT false
 

	
 
static AirportFTAClass *_dummy_airport;
 
static AirportFTAClass *_country_airport;
 
static AirportFTAClass *_city_airport;
 
static AirportFTAClass *_oilrig;
src/airport.h
Show inline comments
 
@@ -54,32 +54,34 @@ struct AirportSpec {
 
	const AirportTileTable * const *table; ///< list of the tiles composing the airport
 
	const TileIndexDiffC *depot_table;     ///< gives the position of the depots on the airports
 
	byte nof_depots;                       ///< the number of depots in this airport
 
	byte size_x;                           ///< size of airport in x direction
 
	byte size_y;                           ///< size of airport in y direction
 
	byte noise_level;                      ///< noise that this airport generates
 
	byte catchment;                        ///< catchment area of this airport
 
	Year min_year;                         ///< first year the airport is available
 
	Year max_year;                         ///< last year the airport is available
 

	
 
	static AirportSpec *Get(byte type)
 
	{
 
		if (type == AT_OILRIG) return &oilrig;
 
		assert(type < NUM_AIRPORTS);
 
		extern AirportSpec _origin_airport_specs[NUM_AIRPORTS];
 
		return &_origin_airport_specs[type];
 
	}
 

	
 
	bool IsAvailable() const;
 

	
 
	static AirportSpec dummy;
 
	static AirportSpec oilrig;
 
};
 

	
 

	
 
enum {
 
	AMED_NOSPDCLAMP = 1 << 0,
 
	AMED_TAKEOFF    = 1 << 1,
 
	AMED_SLOWTURN   = 1 << 2,
 
	AMED_LAND       = 1 << 3,
 
	AMED_EXACTPOS   = 1 << 4,
 
	AMED_BRAKE      = 1 << 5,
 
	AMED_HELI_RAISE = 1 << 6,
 
	AMED_HELI_LOWER = 1 << 7,
0 comments (0 inline, 0 general)