src/station_cmd.cpp
changeset 6049 687015af5ef8
parent 6041 bba4112e5daa
child 6051 99d34e5bbaa1
--- a/src/station_cmd.cpp	Sat Feb 17 14:54:31 2007 +0000
+++ b/src/station_cmd.cpp	Sat Feb 17 15:03:30 2007 +0000
@@ -1618,10 +1618,11 @@
 
 		st->sign.width_1 = 0;
 
-		// if airport type equals Heliport then generate
-		// type 5 name, which is heliport, otherwise airport names (1)
-		if (!GenerateStationName(st, tile, (p1 == AT_HELIPORT)||(p1 == AT_HELIDEPOT)||(p1 == AT_HELISTATION) ? 5 : 1))
+		/* If only helicopters may use the airport generate a helicopter related (5)
+		 * station name, otherwise generate a normal airport name (1) */
+		if (!GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? 5 : 1)) {
 			return CMD_ERROR;
+		}
 	}
 
 	cost += _price.build_airport * w * h;