summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-05-23 16:08:58 +0000
committersmatz <smatz@openttd.org>2008-05-23 16:08:58 +0000
commit3866effe71bcd5e6dfc65c72fca74fa8ff019b29 (patch)
treeb2e1a169fc0933b5a9e74577de464495dda487d6 /src
parent0b07ed0bcdabf8aa2fc16c1855e0ef8675531b16 (diff)
downloadopenttd-3866effe71bcd5e6dfc65c72fca74fa8ff019b29.tar.xz
(svn r13222) -Change: allow old AI building helistations and helidepots for oil rig routes
Diffstat (limited to 'src')
-rw-r--r--src/ai/default/default.cpp3
-rw-r--r--src/table/ai_rail.h12
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 4b1abfafe..fc874f322 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -3446,7 +3446,8 @@ static int AiFindBestDefaultAirportBlock(TileIndex tile, byte cargo, byte heli,
/* 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;
}
diff --git a/src/table/ai_rail.h b/src/table/ai_rail.h
index 5649637c1..43a882429 100644
--- a/src/table/ai_rail.h
+++ b/src/table/ai_rail.h
@@ -593,15 +593,27 @@ static const AiDefaultBlockData _airportdata_ai_5[] = {
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