src/ai/default/default.cpp
changeset 6896 b6051812d11f
parent 6683 7ec558346172
child 6900 872757461d92
equal deleted inserted replaced
6895:a86d6390246a 6896:b6051812d11f
  1422 		// Find a town
  1422 		// Find a town
  1423 		t = AiFindRandomTown();
  1423 		t = AiFindRandomTown();
  1424 		if (t != NULL) {
  1424 		if (t != NULL) {
  1425 			// Find a random oil rig industry
  1425 			// Find a random oil rig industry
  1426 			in = AiFindRandomIndustry();
  1426 			in = AiFindRandomIndustry();
  1427 			if (in != NULL && in->type == IT_OIL_RIG) {
  1427 			if (in != NULL && GetIndustrySpec(in->type)->behaviour & INDUSTRYBEH_AI_AIRSHIP_ROUTES) {
  1428 				if (DistanceManhattan(t->xy, in->xy) < 60)
  1428 				if (DistanceManhattan(t->xy, in->xy) < 60)
  1429 					break;
  1429 					break;
  1430 			}
  1430 			}
  1431 		}
  1431 		}
  1432 
  1432