summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_depotlist.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-15 12:08:08 +0000
committeryexo <yexo@openttd.org>2010-01-15 12:08:08 +0000
commitd669801f1d18e295e7497eaa19d0398da67bffe8 (patch)
tree38c0215af215420346de054481c93d83f36da482 /src/ai/api/ai_depotlist.cpp
parentc37d69d161d418eaf363588df0ac67e61fd7f23e (diff)
downloadopenttd-d669801f1d18e295e7497eaa19d0398da67bffe8.tar.xz
(svn r18807) -Codechange: introduce AirportSpec and move several non-statemachine-related variables to there
Diffstat (limited to 'src/ai/api/ai_depotlist.cpp')
-rw-r--r--src/ai/api/ai_depotlist.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_depotlist.cpp b/src/ai/api/ai_depotlist.cpp
index 558b6c31d..1dc68fb7b 100644
--- a/src/ai/api/ai_depotlist.cpp
+++ b/src/ai/api/ai_depotlist.cpp
@@ -29,9 +29,9 @@ AIDepotList::AIDepotList(AITile::TransportType transport_type)
const Station *st;
FOR_ALL_STATIONS(st) {
if (st->owner == ::_current_company) {
- const AirportFTAClass *afc = st->Airport();
- for (uint i = 0; i < afc->nof_depots; i++) {
- this->AddItem(st->airport_tile + ToTileIndexDiff(afc->airport_depots[i]));
+ const AirportSpec *as = st->GetAirportSpec();
+ for (uint i = 0; i < as->nof_depots; i++) {
+ this->AddItem(st->airport_tile + ToTileIndexDiff(as->depot_table[i]));
}
}
}