From 377fbf9eb7f879375da364d9c8ad4ab2dd1eeeb4 Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 31 Mar 2007 01:16:17 +0000 Subject: [PATCH] (svn r9530) -Codechange: Replace a direct industry type access by a behaviour --- src/ai/default/default.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index edbd0f9c43..258935f733 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -1424,7 +1424,7 @@ static void AiWantOilRigAircraftRoute(Player *p) if (t != NULL) { // Find a random oil rig industry in = AiFindRandomIndustry(); - if (in != NULL && in->type == IT_OIL_RIG) { + if (in != NULL && GetIndustrySpec(in->type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) { if (DistanceManhattan(t->xy, in->xy) < 60) break; }