From f538179878370b3bec8bf1575dc30c1377461ebc Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 11 Mar 2019 10:37:47 +0000 Subject: Feature: Multi-tile docks and docking points. --- src/script/api/script_order.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/script/api') diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp index 04f7c69f4..a72245d04 100644 --- a/src/script/api/script_order.cpp +++ b/src/script/api/script_order.cpp @@ -261,8 +261,10 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr TILE_AREA_LOOP(t, st->train_station) { if (st->TileBelongsToRailStation(t)) return t; } - } else if (st->dock_tile != INVALID_TILE) { - return st->dock_tile; + } else if (st->ship_station.tile != INVALID_TILE) { + TILE_AREA_LOOP(t, st->ship_station) { + if (IsDockTile(t) && GetStationIndex(t) == st->index) return t; + } } else if (st->bus_stops != nullptr) { return st->bus_stops->xy; } else if (st->truck_stops != nullptr) { -- cgit v1.2.3-70-g09d2