diff options
author | tron <tron@openttd.org> | 2007-02-17 07:45:18 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2007-02-17 07:45:18 +0000 |
commit | 8aacd2585d0992dc3a87da8042369bb1830d8cd5 (patch) | |
tree | cdfedf5d3384be14d0978c46e2c599f6c1265392 /src/airport_gui.cpp | |
parent | ee0739561d0ee2167f769ff0abca6302ce270581 (diff) | |
download | openttd-8aacd2585d0992dc3a87da8042369bb1830d8cd5.tar.xz |
(svn r8767) -Fix
-Codechange: Do not hardcode the catchment radius of airports, but hold the information in AirportFTAClass
-Fix (r979): The default AI tested possible airport locations with a fixed catchment radius instead of the radius of the to be built airport
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 90eaab323..9a4b34304 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -150,7 +150,6 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) case WE_PAINT: { int i; // airport enabling loop - int rad = 4; // default catchment radious uint32 avail_airports; const AirportFTAClass *airport; @@ -175,20 +174,7 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) airport = GetAirport(_selected_airport_type); SetTileSelectSize(airport->size_x, airport->size_y); - if (_patches.modified_catchment) { - switch (_selected_airport_type) { - case AT_OILRIG: rad = CA_AIR_OILPAD; break; - case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; - case AT_SMALL: rad = CA_AIR_SMALL; break; - case AT_LARGE: rad = CA_AIR_LARGE; break; - case AT_METROPOLITAN: rad = CA_AIR_METRO; break; - case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; - case AT_COMMUTER: rad = CA_AIR_COMMUTER; break; - case AT_HELIDEPOT: rad = CA_AIR_HELIDEPOT; break; - case AT_INTERCON: rad = CA_AIR_INTERCON; break; - case AT_HELISTATION: rad = CA_AIR_HELISTATION; break; - } - } + uint rad = _patches.modified_catchment ? airport->catchment : 4; if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |