summaryrefslogtreecommitdiff
path: root/src/airport.cpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-03-29 13:52:34 +0000
committercelestar <celestar@openttd.org>2007-03-29 13:52:34 +0000
commita1ab0d29fe5d5f0e5b90cc0908837f6b301d32f7 (patch)
tree37ea5878b75e7b5f0193b94c6d3c2aa3e1e9b498 /src/airport.cpp
parent386e298acd7855feb54d7b75ce0e3144db487649 (diff)
downloadopenttd-a1ab0d29fe5d5f0e5b90cc0908837f6b301d32f7.tar.xz
(svn r9524) -Fix(FS#640,r8755): Implemented a "dummy" State Machine for stations who got their airport removed while there were still aircraft within the State Machine (and thus caused asserts)
Diffstat (limited to 'src/airport.cpp')
-rw-r--r--src/airport.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/airport.cpp b/src/airport.cpp
index a2c59d89b..539687997 100644
--- a/src/airport.cpp
+++ b/src/airport.cpp
@@ -20,6 +20,7 @@
* - false: give a summarized report which only shows current and next position */
//#define DEBUG_AIRPORT false
+static AirportFTAClass *DummyAirport;
static AirportFTAClass *CountryAirport;
static AirportFTAClass *CityAirport;
static AirportFTAClass *Oilrig;
@@ -34,6 +35,20 @@ static AirportFTAClass *HeliStation;
void InitializeAirports()
{
+ DummyAirport = new AirportFTAClass(
+ _airport_moving_data_dummy,
+ NULL,
+ NULL,
+ _airport_entries_dummy,
+ AirportFTAClass::ALL,
+ _airport_fta_dummy,
+ NULL,
+ 0,
+ 0, 0,
+ 0,
+ 0
+ );
+
CountryAirport = new AirportFTAClass(
_airport_moving_data_country,
_airport_terminal_country,
@@ -463,6 +478,7 @@ const AirportFTAClass *GetAirport(const byte airport_type)
case AT_HELIDEPOT: return HeliDepot;
case AT_INTERCON: return IntercontinentalAirport;
case AT_HELISTATION: return HeliStation;
+ case AT_DUMMY: return DummyAirport;
}
}