(svn r19465) -Codechange: support for multi-tile hangars

This commit is contained in:
yexo
2010-03-19 11:17:52 +00:00
parent f2743cd5ed
commit 1579e9ded2
8 changed files with 59 additions and 24 deletions

View File

@@ -96,7 +96,7 @@
if (st->owner != _current_company) return -1;
if ((st->facilities & FACIL_AIRPORT) == 0) return -1;
return st->airport.GetSpec()->nof_depots;
return st->airport.GetNumHangars();
}
/* static */ TileIndex AIAirport::GetHangarOfAirport(TileIndex tile)

View File

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