From 72857162ddee0df447758c4261c0c5d3ce7669c3 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 17 Feb 2007 07:45:18 +0000 Subject: (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 --- src/ai/default/default.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/ai') 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); -- cgit v1.2.3-70-g09d2