From a1ab0d29fe5d5f0e5b90cc0908837f6b301d32f7 Mon Sep 17 00:00:00 2001 From: celestar Date: Thu, 29 Mar 2007 13:52:34 +0000 Subject: (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) --- src/airport.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/airport.cpp') 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; } } -- cgit v1.2.3-54-g00ecf