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 | 72857162ddee0df447758c4261c0c5d3ce7669c3 (patch) | |
tree | cdfedf5d3384be14d0978c46e2c599f6c1265392 /src/ai/default | |
parent | 3c0b59e46e8ae47ff1bb8d8e13cefb76493ada87 (diff) | |
download | openttd-72857162ddee0df447758c4261c0c5d3ce7669c3.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/ai/default')
-rw-r--r-- | src/ai/default/default.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 33f62c7f2..f8af9c333 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -3333,19 +3333,13 @@ static int32 AiDoBuildDefaultAirportBlock(TileIndex tile, const AiDefaultBlockDa static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p, byte cargo) { uint values[NUM_CARGO]; - int rad; - - if (_patches.modified_catchment) { - rad = CA_AIR_LARGE; // I Have NFI what airport the - } else { // AI is going to build here - rad = 4; - } for (; p->mode == 0; p++) { TileIndex tile2 = TILE_ADD(tile, ToTileIndexDiff(p->tileoffs)); const AirportFTAClass* airport = GetAirport(p->attr); uint w = airport->size_x; uint h = airport->size_y; + uint rad = _patches.modified_catchment ? airport->catchment : 4; if (cargo & 0x80) { GetProductionAroundTiles(values, tile2, w, h, rad); |