Merge branch 'master' into jgrpp-nrt
# Conflicts: # config.lib # src/core/bitmath_func.hpp # src/lang/korean.txt # src/main_gui.cpp # src/order_gui.cpp # src/script/api/script_object.cpp # src/station_cmd.cpp # src/video/cocoa/wnd_quartz.mm
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "tilehighlight_func.h"
|
||||
#include "network/network.h"
|
||||
#include "station_base.h"
|
||||
#include "industry.h"
|
||||
#include "waypoint_base.h"
|
||||
#include "core/geometry_func.hpp"
|
||||
#include "infrastructure_func.h"
|
||||
@@ -983,11 +984,17 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
||||
return order;
|
||||
}
|
||||
|
||||
if (IsTileType(tile, MP_STATION)) {
|
||||
StationID st_index = GetStationIndex(tile);
|
||||
const Station *st = Station::Get(st_index);
|
||||
/* check for station or industry with neutral station */
|
||||
if (IsTileType(tile, MP_STATION) || IsTileType(tile, MP_INDUSTRY)) {
|
||||
const Station *st = nullptr;
|
||||
|
||||
if (IsInfraUsageAllowed(v->type, v->owner, st->owner)) {
|
||||
if (IsTileType(tile, MP_STATION)) {
|
||||
st = Station::GetByTile(tile);
|
||||
} else {
|
||||
const Industry *in = Industry::GetByTile(tile);
|
||||
st = in->neutral_station;
|
||||
}
|
||||
if (st != nullptr && IsInfraUsageAllowed(v->type, v->owner, st->owner)) {
|
||||
byte facil;
|
||||
switch (v->type) {
|
||||
case VEH_SHIP: facil = FACIL_DOCK; break;
|
||||
@@ -997,6 +1004,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
if (st->facilities & facil) {
|
||||
StationID st_index = GetStationIndex(st->xy);
|
||||
order.MakeGoToStation(st_index);
|
||||
if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY);
|
||||
if ((_settings_client.gui.new_nonstop || _settings_game.order.nonstop_only) && v->IsGroundVehicle()) order.SetNonStopType(ONSF_NO_STOP_AT_INTERMEDIATE_STATIONS);
|
||||
|
Reference in New Issue
Block a user