(svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes
authorsmatz
Fri, 23 May 2008 16:08:58 +0000
changeset 10678 f810c0a333da
parent 10677 31915681d854
child 10680 66a611e5bc07
(svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes
src/ai/default/default.cpp
src/table/ai_rail.h
--- a/src/ai/default/default.cpp	Fri May 23 15:57:18 2008 +0000
+++ b/src/ai/default/default.cpp	Fri May 23 16:08:58 2008 +0000
@@ -3446,7 +3446,8 @@
 		/* do not build small airport if we have large available and we are not building heli route */
 		uint valid = GetValidAirports();
 		for (uint i = 0; (p = _airport_default_block_data[i]) != NULL; i++) {
-			if (HasBit(valid, p->attr) && !(GetAirport(p->attr)->flags & AirportFTAClass::SHORT_STRIP)) {
+			uint flags = GetAirport(p->attr)->flags;
+			if (HasBit(valid, p->attr) && (flags & AirportFTAClass::AIRPLANES) && !(flags & AirportFTAClass::SHORT_STRIP)) {
 				no_small = true;
 				break;
 			}
--- a/src/table/ai_rail.h	Fri May 23 15:57:18 2008 +0000
+++ b/src/table/ai_rail.h	Fri May 23 16:08:58 2008 +0000
@@ -593,15 +593,27 @@
 	MKEND(),
 };
 
+static const AiDefaultBlockData _airportdata_ai_6[] = {
+	MKAIR(6, 0, 0),
+	MKEND(),
+};
+
 static const AiDefaultBlockData _airportdata_ai_7[] = {
 	MKAIR(7, 0, 0),
 	MKEND(),
 };
 
+static const AiDefaultBlockData _airportdata_ai_8[] = {
+	MKAIR(8, 0, 0),
+	MKEND(),
+};
+
 #undef MKAIR
 #undef MDEND
 
 static const AiDefaultBlockData * const _airport_default_block_data[] = {
+	_airportdata_ai_8, // helistation
+	_airportdata_ai_6, // helidepot
 	_airportdata_ai_7, // intercontinental airport
 	_airportdata_ai_4, // international airport
 	_airportdata_ai_3, // metropolitan airport