(svn r18807) -Codechange: introduce AirportSpec and move several non-statemachine-related variables to there

This commit is contained in:
yexo
2010-01-15 12:08:08 +00:00
parent c37d69d161
commit d669801f1d
16 changed files with 555 additions and 285 deletions

View File

@@ -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]));
}
}
}