Changeset - r6027:1fb37bd464b6
[Not reviewed]
master
0 3 0
KUDr - 18 years ago 2007-02-15 22:00:04
kudr@openttd.org
(svn r8750) -Fix (r8747): PLANES defined in wingdi.h caused compilation error under Win32. Changed to AIRPLANES
3 files changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/ai/default/default.cpp
Show inline comments
 
@@ -3266,13 +3266,13 @@ static void AiStateAirportStuff(Player *
 

	
 
			// Do we own the airport? (Oilrigs aren't owned, though.)
 
			if (st->owner != OWNER_NONE && st->owner != _current_player) continue;
 

	
 
			AirportFTAClass::Flags flags = GetAirport(st->airport_type)->flags;
 

	
 
			if (!(flags & (p->ai.build_kind == 1 && i == 0 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::PLANES))) {
 
			if (!(flags & (p->ai.build_kind == 1 && i == 0 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
 
				continue;
 
			}
 

	
 
			// Dismiss airports too far away.
 
			if (DistanceMax(st->airport_tile, aib->spec_tile) > aib->rand_rng)
 
				continue;
 
@@ -3289,13 +3289,13 @@ static void AiStateAirportStuff(Player *
 
			 * when building new airports - and that's irrelevant
 
			 * for us. So using just about any rule will suffice
 
			 * here for now (some of the new airport types would be
 
			 * broken because they will probably need different
 
			 * tileoff values etc), no matter that
 
			 * IsHangarTile() makes no sense. --pasky */
 
			if (!(flags & AirportFTAClass::PLANES)) {
 
			if (!(flags & AirportFTAClass::AIRPLANES)) {
 
				/* Heliports should have maybe own rulesets but
 
				 * OTOH we don't want AI to pick them up when
 
				 * looking for a suitable airport type to build.
 
				 * So any of rules 0 or 1 would do for now. The
 
				 * original rule number was 2 but that's a bug
 
				 * because we have no such rule. */
src/aircraft_cmd.cpp
Show inline comments
 
@@ -248,13 +248,13 @@ int32 CmdBuildAircraft(TileIndex tile, u
 

	
 
	SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES);
 

	
 
	// Prevent building aircraft types at places which can't handle them
 
	const Station* st = GetStationByTile(tile);
 
	const AirportFTAClass* apc = GetAirport(st->airport_type);
 
	if (!(apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::PLANES : AirportFTAClass::HELICOPTERS))) {
 
	if (!(apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::AIRPLANES : AirportFTAClass::HELICOPTERS))) {
 
		return CMD_ERROR;
 
	}
 

	
 
	/* Allocate 2 or 3 vehicle structs, depending on type
 
	 * vl[0] = aircraft, vl[1] = shadow, [vl[2] = rotor] */
 
	if (!AllocateVehicles(vl, avi->subtype & AIR_CTOL ? 2 : 3)) {
 
@@ -1637,13 +1637,13 @@ static void AircraftEventHandler_Flying(
 
	byte landingtype;
 
	AirportFTA *current;
 
	uint16 tcur_speed, tsubspeed;
 

	
 
	st = GetStation(v->u.air.targetairport);
 
	// runway busy or not allowed to use this airstation, circle
 
	if (apc->flags & (v->subtype == AIR_HELICOPTER ? AirportFTAClass::HELICOPTERS : AirportFTAClass::PLANES) &&
 
	if (apc->flags & (v->subtype == AIR_HELICOPTER ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES) &&
 
			st->airport_tile != 0 &&
 
			(st->owner == OWNER_NONE || st->owner == v->owner)) {
 
		// {32,FLYING,NOTHING_block,37}, {32,LANDING,N,33}, {32,HELILANDING,N,41},
 
		// if it is an airplane, look for LANDING, for helicopter HELILANDING
 
		// it is possible to choose from multiple landing runways, so loop until a free one is found
 
		landingtype = (v->subtype == AIR_HELICOPTER) ? HELILANDING : LANDING;
src/airport.h
Show inline comments
 
@@ -119,15 +119,15 @@ typedef struct AirportMovingData {
 
struct AirportFTAbuildup;
 

	
 
// Finite sTate mAchine --> FTA
 
typedef struct AirportFTAClass {
 
	public:
 
		enum Flags {
 
			PLANES      = 0x1,
 
			AIRPLANES   = 0x1,
 
			HELICOPTERS = 0x2,
 
			ALL         = PLANES | HELICOPTERS,
 
			ALL         = AIRPLANES | HELICOPTERS,
 
			SHORT_STRIP = 0x4
 
		};
 

	
 
		AirportFTAClass(
 
			const AirportMovingData *moving_data,
 
			const byte *terminals,
0 comments (0 inline, 0 general)