diff options
Diffstat (limited to 'src/ai/api/ai_depotlist.cpp')
-rw-r--r-- | src/ai/api/ai_depotlist.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ai/api/ai_depotlist.cpp b/src/ai/api/ai_depotlist.cpp index bade09bcd..de3433834 100644 --- a/src/ai/api/ai_depotlist.cpp +++ b/src/ai/api/ai_depotlist.cpp @@ -29,8 +29,7 @@ AIDepotList::AIDepotList(AITile::TransportType transport_type) const Station *st; FOR_ALL_STATIONS(st) { if (st->owner == ::_current_company) { - const AirportSpec *as = st->airport.GetSpec(); - for (uint i = 0; i < as->nof_depots; i++) { + for (uint i = 0; i < st->airport.GetNumHangars(); i++) { this->AddItem(st->airport.GetHangarTile(i)); } } |