Merge branch 'master' into jgrpp-beta
# Conflicts: # .github/workflows/ci-build.yml # src/lang/german.txt # src/lang/romanian.txt # src/lang/slovak.txt # src/lang/turkish.txt # src/network/core/address.cpp # src/network/core/tcp.h # src/network/core/udp.cpp # src/network/network.cpp # src/network/network_client.cpp # src/network/network_server.cpp # src/network/network_server.h # src/network/network_udp.cpp # src/openttd.cpp # src/saveload/newgrf_sl.cpp # src/tree_cmd.cpp # src/video/video_driver.hpp # src/window.cpp # src/window_gui.h
This commit is contained in:
@@ -261,11 +261,11 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
||||
case OT_GOTO_STATION: {
|
||||
const Station *st = ::Station::Get(order->GetDestination());
|
||||
if (st->train_station.tile != INVALID_TILE) {
|
||||
TILE_AREA_LOOP(t, st->train_station) {
|
||||
for (TileIndex t : st->train_station) {
|
||||
if (st->TileBelongsToRailStation(t)) return t;
|
||||
}
|
||||
} else if (st->ship_station.tile != INVALID_TILE) {
|
||||
TILE_AREA_LOOP(t, st->ship_station) {
|
||||
for (TileIndex t : st->ship_station) {
|
||||
if (IsTileType(t, MP_STATION) && (IsDock(t) || IsOilRig(t)) && GetStationIndex(t) == st->index) return t;
|
||||
}
|
||||
} else if (st->bus_stops != nullptr) {
|
||||
@@ -273,7 +273,7 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
||||
} else if (st->truck_stops != nullptr) {
|
||||
return st->truck_stops->xy;
|
||||
} else if (st->airport.tile != INVALID_TILE) {
|
||||
TILE_AREA_LOOP(tile, st->airport) {
|
||||
for (TileIndex tile : st->airport) {
|
||||
if (st->TileBelongsToAirport(tile) && !::IsHangar(tile)) return tile;
|
||||
}
|
||||
}
|
||||
@@ -283,7 +283,7 @@ static int ScriptOrderPositionToRealOrderPosition(VehicleID vehicle_id, ScriptOr
|
||||
case OT_GOTO_WAYPOINT: {
|
||||
const Waypoint *wp = ::Waypoint::Get(order->GetDestination());
|
||||
if (wp->train_station.tile != INVALID_TILE) {
|
||||
TILE_AREA_LOOP(t, wp->train_station) {
|
||||
for (TileIndex t : wp->train_station) {
|
||||
if (wp->TileBelongsToRailStation(t)) return t;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user