diff options
author | yexo <yexo@openttd.org> | 2010-03-18 23:12:38 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-03-18 23:12:38 +0000 |
commit | 38f4cb64699af17b3456b93157eb528d6532b46d (patch) | |
tree | d2a6a9f247738a42f24309155a0e40af43362cb9 /src/newgrf.cpp | |
parent | a99a7e7a3784ce6678f8ce2402473133efe511e5 (diff) | |
download | openttd-38f4cb64699af17b3456b93157eb528d6532b46d.tar.xz |
(svn r19457) -Codechange: introduce AirportOverrideManager to keep track of airports if a newgrf can't be found
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index d0b6ab8f5..7e0fa228b 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6258,6 +6258,15 @@ static void FinaliseAirportsArray() { const GRFFile * const *end = _grf_files.End(); for (GRFFile **file = _grf_files.Begin(); file != end; file++) { + AirportSpec **&airportspec = (*file)->airportspec; + if (airportspec != NULL) { + for (int i = 0; i < NUM_AIRPORTS; i++) { + if (airportspec[i] != NULL && airportspec[i]->enabled) { + _airport_mngr.SetEntitySpec(airportspec[i]); + } + } + } + AirportTileSpec **&airporttilespec = (*file)->airtspec; if (airporttilespec != NULL) { for (int i = 0; i < NUM_AIRPORTTILES; i++) { |