diff options
author | tron <tron@openttd.org> | 2007-02-10 08:19:39 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-10 08:19:39 +0000 |
commit | 356e47f1087b56244694a646eb73ee6c9264a229 (patch) | |
tree | e8a4f43e2fa50f6e1637a184752b1ce7c9f43a9c /src/airport.cpp | |
parent | b4592c8a542c06f4509402ebac846a44775740c9 (diff) | |
download | openttd-356e47f1087b56244694a646eb73ee6c9264a229.tar.xz |
(svn r8660) -Fix
-Codechange: Remove _avail_aircraft
Its name is misleading. It is rather _avail_airports, but then only some of them, which leads to inconsistencies when using it.
Further it is unnecessary to store it in savegams.
Diffstat (limited to 'src/airport.cpp')
-rw-r--r-- | src/airport.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/airport.cpp b/src/airport.cpp index 2d118e1cf..c5b375c7f 100644 --- a/src/airport.cpp +++ b/src/airport.cpp @@ -447,13 +447,16 @@ const AirportFTAClass *GetAirport(const byte airport_type) uint32 GetValidAirports(void) { - uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft() - - if (_cur_year >= 1980) SETBIT(bytemask, 3); // metropolitan airport - if (_cur_year >= 1990) SETBIT(bytemask, 4); // international airport - if (_cur_year >= 1983) SETBIT(bytemask, 5); // commuter airport - if (_cur_year >= 1976) SETBIT(bytemask, 6); // helidepot - if (_cur_year >= 2002) SETBIT(bytemask, 7); // intercontinental airport - if (_cur_year >= 1980) SETBIT(bytemask, 8); // helistation - return bytemask; + uint32 mask = 0; + + if (_cur_year < 1960 || _patches.always_small_airport) SETBIT(mask, 0); // small airport + if (_cur_year >= 1955) SETBIT(mask, 1); // city airport + if (_cur_year >= 1963) SETBIT(mask, 2); // heliport + if (_cur_year >= 1980) SETBIT(mask, 3); // metropolitan airport + if (_cur_year >= 1990) SETBIT(mask, 4); // international airport + if (_cur_year >= 1983) SETBIT(mask, 5); // commuter airport + if (_cur_year >= 1976) SETBIT(mask, 6); // helidepot + if (_cur_year >= 2002) SETBIT(mask, 7); // intercontinental airport + if (_cur_year >= 1980) SETBIT(mask, 8); // helistation + return mask; } |