1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 05:59:10 +00:00

(svn r19455) -Codechange: split all airport information in Station to a seperate class

This commit is contained in:
yexo
2010-03-18 21:02:20 +00:00
parent 0eb5709c86
commit c4a88ce022
23 changed files with 100 additions and 97 deletions

View File

@@ -196,7 +196,7 @@ static byte MapAircraftMovementState(const Aircraft *v)
const Station *st = GetTargetAirportIfValid(v);
if (st == NULL) return AMS_TTDP_FLIGHT_TO_TOWER;
const AirportFTAClass *afc = st->Airport();
const AirportFTAClass *afc = st->airport.GetFTA();
uint16 amdflag = afc->MovingData(v->pos)->flag;
switch (v->state) {
@@ -600,7 +600,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
const Station *st = GetTargetAirportIfValid(Aircraft::From(v));
if (st != NULL && st->airport.tile != INVALID_TILE) {
airporttype = st->GetAirportSpec()->ttd_airport_type;
airporttype = st->airport.GetSpec()->ttd_airport_type;
}
return (altitude << 8) | airporttype;