diff options
author | tron <tron@openttd.org> | 2007-02-17 15:03:30 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-17 15:03:30 +0000 |
commit | e175a85e1005b30629c43017e44afbb9accb3b94 (patch) | |
tree | ba496f1d65bae9075ebd411393e7fdc86750115c /src | |
parent | fbd83baff61e6664adc8070a771b9119d0ff3cab (diff) | |
download | openttd-e175a85e1005b30629c43017e44afbb9accb3b94.tar.xz |
(svn r8779) -Fix
-Codechange: Use a more generic test, which tests the allowed aircraft instead of hardcoding the airport type numbers, to generate station names
Diffstat (limited to 'src')
-rw-r--r-- | src/station_cmd.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index efb08d91f..35ff41c39 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1618,10 +1618,11 @@ int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) 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; |