summaryrefslogtreecommitdiff
path: root/ai/default
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-05-20 15:13:27 +0000
committertron <tron@openttd.org>2006-05-20 15:13:27 +0000
commitedb5e87e0c1dc116e5281ac775b2ca17e67654d3 (patch)
treeed501eeb08a1ccb519796aec762515649521aa43 /ai/default
parent910aa90bd366d10df423f1d591b6bebb8a972256 (diff)
downloadopenttd-edb5e87e0c1dc116e5281ac775b2ca17e67654d3.tar.xz
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
Diffstat (limited to 'ai/default')
-rw-r--r--ai/default/default.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ai/default/default.c b/ai/default/default.c
index b0915f10a..4b1bcfc92 100644
--- a/ai/default/default.c
+++ b/ai/default/default.c
@@ -3328,8 +3328,9 @@ static bool AiCheckAirportResources(TileIndex tile, const AiDefaultBlockData *p,
for (; p->mode == 0; p++) {
TileIndex tile2 = TILE_ADD(tile, ToTileIndexDiff(p->tileoffs));
- uint w = _airport_size_x[p->attr];
- uint h = _airport_size_y[p->attr];
+ const AirportFTAClass* airport = GetAirport(p->attr);
+ uint w = airport->size_x;
+ uint h = airport->size_y;
if (cargo & 0x80) {
GetProductionAroundTiles(values, tile2, w, h, rad);