src/aircraft.h
branchNewGRF_ports
changeset 10305 e90761e37744
parent 10200 aba3af04cdbd
child 10337 3d5a7bddcea6
--- a/src/aircraft.h	Sun Apr 20 23:50:19 2008 +0000
+++ b/src/aircraft.h	Wed Apr 23 03:14:27 2008 +0000
@@ -44,7 +44,8 @@
 	const AirportFTAClass *apc = st->Airport();
 	const AircraftVehicleInfo *avi = AircraftVehInfo(engine);
 
-	if ((apc->flags & AirportFTAClass::SEAPLANES) && ((avi->subtype & AirportFTAClass::SEAPLANES) == 0)) return false;
+	if ((apc->flags & AirportFTAClass::SEAPLANES) && (avi->airport_required == AIRPORT_LAND_ONLY)) return false;  ///< restrict to what can be built at a seaplane airport
+	if (!(apc->flags & AirportFTAClass::SEAPLANES) && (avi->airport_required == AIRPORT_SEA_ONLY)) return false;  ///< restrict to what can be built at a land airport
 	return (apc->flags & (avi->subtype & AIR_CTOL ? AirportFTAClass::AIRPLANES : AirportFTAClass::HELICOPTERS)) != 0;
 }
 
@@ -103,7 +104,7 @@
 /**
  * This class 'wraps' Vehicle; you do not actually instantiate this class.
  * You create a Vehicle using AllocateVehicle, so it is added to the pool
- * and you reinitialize that to a Train using:
+ * and you reinitialize that to an Aircraft using:
  *   v = new (v) Aircraft();
  *
  * As side-effect the vehicle type is set correctly.