@@ -97,12 +97,13 @@ AirportSpec AirportSpec::specs[NUM_AIRPO
*/
/* static */ const AirportSpec *AirportSpec::Get(byte type)
{
assert(type < lengthof(AirportSpec::specs));
const AirportSpec *as = &AirportSpec::specs[type];
if (type >= NEW_AIRPORT_OFFSET && !as->enabled) {
if (_airport_mngr.GetGRFID(type) == 0) return as;
byte subst_id = _airport_mngr.GetSubstituteID(type);
if (subst_id == AT_INVALID) return as;
as = &AirportSpec::specs[subst_id];
}
if (as->grf_prop.override != AT_INVALID) return &AirportSpec::specs[as->grf_prop.override];
return as;
Status change: