From 4d4005d8b7455fba8fe4e59dc99727a4caec6edf Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Fri, 20 Mar 2020 10:46:57 +0000 Subject: Fix #8039: [AI/GS] SetOrderFlags and GetOrderDestination didn't work for oil rigs --- src/script/api/script_order.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/script') diff --git a/src/script/api/script_order.cpp b/src/script/api/script_order.cpp index 3290e5103..5166c0614 100644 --- a/src/script/api/script_order.cpp +++ b/src/script/api/script_order.cpp @@ -261,7 +261,7 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr } } else if (st->ship_station.tile != INVALID_TILE) { TILE_AREA_LOOP(t, st->ship_station) { - if (IsDockTile(t) && GetStationIndex(t) == st->index) return t; + if (IsTileType(t, MP_STATION) && (IsDock(t) || IsOilRig(t)) && GetStationIndex(t) == st->index) return t; } } else if (st->bus_stops != nullptr) { return st->bus_stops->xy; -- cgit v1.2.3-70-g09d2