summaryrefslogtreecommitdiff
path: root/airport.c
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2006-08-16 11:49:52 +0000
committerrubidium <rubidium@openttd.org>2006-08-16 11:49:52 +0000
commitdddd90583d5424a259449fdcfe502e0d595646ad (patch)
tree807654fc10f81e69fcd35330e2e1c145b200a512 /airport.c
parent3cab5f30c06035034bcf5b513c2eee57b8ec11e9 (diff)
downloadopenttd-dddd90583d5424a259449fdcfe502e0d595646ad.tar.xz
(svn r5927) -Cleanup: check against _cur_year instead of _date when determining the availability of airports, as they only become available at the beginning of a year.
Diffstat (limited to 'airport.c')
-rw-r--r--airport.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/airport.c b/airport.c
index e8e5ce2dd..6402c9dda 100644
--- a/airport.c
+++ b/airport.c
@@ -475,13 +475,11 @@ uint32 GetValidAirports(void)
{
uint32 bytemask = _avail_aircraft; /// sets the first 3 bytes, 0 - 2, @see AdjustAvailAircraft()
- // 1980-1-1 is --> 21915
- // 1990-1-1 is --> 25568
- if (_date >= 21915) SETBIT(bytemask, 3); // metropilitan airport 1980
- if (_date >= 25568) SETBIT(bytemask, 4); // international airport 1990
- if (_date >= 23011) SETBIT(bytemask, 5); // commuter airport 1983
- if (_date >= 20455) SETBIT(bytemask, 6); // helidepot 1976
- if (_date >= 29951) SETBIT(bytemask, 7); // intercontinental airport 2002
- if (_date >= 21915) SETBIT(bytemask, 8); // helistation 1980
+ if (_cur_year >= 1980) SETBIT(bytemask, 3); // metropilitan 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;
}