ship_cmd.c
changeset 3472 7ef2b2d6a632
parent 3454 c2447e8c1e23
child 3476 1d130c5ed5e0
--- a/ship_cmd.c	Fri Apr 07 09:37:04 2006 +0000
+++ b/ship_cmd.c	Fri Apr 07 15:57:03 2006 +0000
@@ -190,17 +190,6 @@
 	SndPlayVehicleFx(ShipVehInfo(v->engine_type)->sfx, v);
 }
 
-static const TileIndexDiffC _dock_offs[] = {
-	{ 2,  0},
-	{-2,  0},
-	{ 0,  2},
-	{ 2,  0},
-	{ 0, -2},
-	{ 0,  0},
-	{ 0,  0},
-	{ 0,  0}
-};
-
 static void ProcessShipOrder(Vehicle *v)
 {
 	const Order *order;
@@ -245,7 +234,7 @@
 
 		st = GetStation(order->station);
 		if (st->dock_tile != 0) {
-			v->dest_tile = TILE_ADD(st->dock_tile, ToTileIndexDiff(_dock_offs[_m[st->dock_tile].m5-0x4B]));
+			v->dest_tile = TILE_ADD(st->dock_tile, ToTileIndexDiff(GetDockOffset(st->dock_tile)));
 		}
 	} else if (order->type == OT_GOTO_DEPOT) {
 		v->dest_tile = GetDepot(order->station)->xy;