summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-03-11 10:37:47 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-06-30 16:46:32 +0200
commitf538179878370b3bec8bf1575dc30c1377461ebc (patch)
tree890738c37245a49eb2a8ad52f4afb805baaa9d42 /src/script
parentf1c39153413b07a964dfde8fd9d6310f0da4987b (diff)
downloadopenttd-f538179878370b3bec8bf1575dc30c1377461ebc.tar.xz
Feature: Multi-tile docks and docking points.
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_order.cpp6
1 files changed, 4 insertions, 2 deletions
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) {