Index: ai.c
===================================================================
--- ai.c	(revision 725)
+++ ai.c	(working copy)
@@ -3224,6 +3224,11 @@
 			if (acc_planes == HELICOPTERS_ONLY && !(p->ai.build_kind == 1 && i == 1))
 				continue;
 
+			// Dismiss country airports if we are doing the other
+			// endpoint of an oilrig route.
+			if (acc_planes == AIRCRAFT_ONLY && (p->ai.build_kind == 1 && i == 0))
+				continue;
+
 			// Dismiss airports too far away.
 			if (GetTileDist1D(st->airport_tile, aib->spec_tile) > aib->rand_rng)
 				continue;
@@ -3303,11 +3308,16 @@
 	return true;
 }
 
-static int AiFindBestDefaultAirportBlock(TileIndex tile, byte cargo, int32 *cost)
+static int AiFindBestDefaultAirportBlock(TileIndex tile, byte cargo, byte heli, int32 *cost)
 {
 	int i;
 	const AiDefaultBlockData *p;
 	for(i=0; (p = _airport_default_block_data[i]) != NULL; i++) {
+		// If we are doing a helicopter service, avoid building
+		// airports where they can't land.
+		if (heli && GetAirport(p->attr)->acc_planes == AIRCRAFT_ONLY)
+			continue;
+
 		*cost = AiDoBuildDefaultAirportBlock(tile, p, 0);
 		if (*cost != CMD_ERROR && AiCheckAirportResources(tile, p, cargo))
 			return i;
@@ -3344,7 +3354,7 @@
 			aib->use_tile = AdjustTileCoordRandomly(aib->spec_tile, aib->rand_rng);
 
 			// check if the aircraft stuff can be built there.
-			rule = AiFindBestDefaultAirportBlock(aib->use_tile, aib->cargo, &cost);
+			rule = AiFindBestDefaultAirportBlock(aib->use_tile, aib->cargo, p->ai.build_kind, &cost);
 
 #if 0
 			if (!IS_TILETYPE(aib->use_tile, MP_STREET) &&
