Changeset - r6027:1fb37bd464b6
[Not reviewed]
master
0 3 0
KUDr - 17 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
 
@@ -3269,7 +3269,7 @@ static void AiStateAirportStuff(Player *
 

	
 
			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;
 
			}
 

	
 
@@ -3292,7 +3292,7 @@ static void AiStateAirportStuff(Player *
 
			 * 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.
src/aircraft_cmd.cpp
Show inline comments
 
@@ -251,7 +251,7 @@ int32 CmdBuildAircraft(TileIndex tile, u
 
	// 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;
 
	}
 

	
 
@@ -1640,7 +1640,7 @@ static void AircraftEventHandler_Flying(
 

	
 
	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},
src/airport.h
Show inline comments
 
@@ -122,9 +122,9 @@ struct AirportFTAbuildup;
 
typedef struct AirportFTAClass {
 
	public:
 
		enum Flags {
 
			PLANES      = 0x1,
 
			AIRPLANES   = 0x1,
 
			HELICOPTERS = 0x2,
 
			ALL         = PLANES | HELICOPTERS,
 
			ALL         = AIRPLANES | HELICOPTERS,
 
			SHORT_STRIP = 0x4
 
		};
 

	
0 comments (0 inline, 0 general)