summaryrefslogtreecommitdiff
path: root/src/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-02-16 09:38:43 +0000
committertron <tron@openttd.org>2007-02-16 09:38:43 +0000
commit87e03c7aa8364ab7418396079522c26ec112dc83 (patch)
tree36bede5a1addc08aa86f08b4b01dbd3f41400689 /src/ai/default
parent6c17cd4c464799c3a83da3a677c8002fc26f7d9d (diff)
downloadopenttd-87e03c7aa8364ab7418396079522c26ec112dc83.tar.xz
(svn r8755) -Fix
Abbreviate GetAirport(st->airport_type) to st->Airport()
Diffstat (limited to 'src/ai/default')
-rw-r--r--src/ai/default/default.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index 957993edb..33f62c7f2 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -3267,7 +3267,7 @@ static void AiStateAirportStuff(Player *p)
// 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;
+ AirportFTAClass::Flags flags = st->Airport()->flags;
if (!(flags & (p->ai.build_kind == 1 && i == 0 ? AirportFTAClass::HELICOPTERS : AirportFTAClass::AIRPLANES))) {
continue;
@@ -3469,7 +3469,7 @@ static void AiStateBuildAircraftVehicles(Player *p)
/* XXX - Have the AI pick the hangar terminal in an airport. Eg get airport-type
* and offset to the FIRST depot because the AI picks the st->xy tile */
- tile += ToTileIndexDiff(GetAirport(GetStationByTile(tile)->airport_type)->airport_depots[0]);
+ tile += ToTileIndexDiff(GetStationByTile(tile)->Airport()->airport_depots[0]);
if (CmdFailed(DoCommand(tile, veh, 0, DC_EXEC, CMD_BUILD_AIRCRAFT))) return;
loco_id = _new_vehicle_id;