From c0cb020c801d4f03f535faa18228eb7194bf6dc1 Mon Sep 17 00:00:00 2001 From: celestar Date: Fri, 7 Apr 2006 15:57:03 +0000 Subject: (svn r4317) -Codechange: More map accessors for ship_cmd. it is now map-access free, but still requires a huge cleanup --- ship_cmd.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'ship_cmd.c') diff --git a/ship_cmd.c b/ship_cmd.c index 6ad48e263..b5c5dba4c 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -190,17 +190,6 @@ static void PlayShipSound(Vehicle *v) 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 @@ static void ProcessShipOrder(Vehicle *v) 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; -- cgit v1.2.3-70-g09d2