Merge branch 'master' into jgrpp
# Conflicts: # config.lib # projects/openttd_vs140.vcxproj # projects/openttd_vs140.vcxproj.filters # projects/openttd_vs141.vcxproj # projects/openttd_vs141.vcxproj.filters # projects/openttd_vs142.vcxproj # projects/openttd_vs142.vcxproj.filters # src/aircraft_cmd.cpp # src/base_station_base.h # src/core/pool_type.hpp # src/disaster_vehicle.cpp # src/economy.cpp # src/engine.cpp # src/group.h # src/group_cmd.cpp # src/group_gui.cpp # src/lang/english.txt # src/lang/german.txt # src/linkgraph/linkgraph_gui.cpp # src/network/network_command.cpp # src/network/network_server.cpp # src/openttd.cpp # src/order_cmd.cpp # src/road_cmd.cpp # src/saveload/afterload.cpp # src/saveload/cargopacket_sl.cpp # src/saveload/linkgraph_sl.cpp # src/saveload/order_sl.cpp # src/saveload/station_sl.cpp # src/saveload/town_sl.cpp # src/saveload/vehicle_sl.cpp # src/screenshot.cpp # src/screenshot.h # src/settings_gui.cpp # src/settings_type.h # src/smallmap_gui.cpp # src/station.cpp # src/station_cmd.cpp # src/table/settings.ini # src/toolbar_gui.cpp # src/town_cmd.cpp # src/train.h # src/train_cmd.cpp # src/train_gui.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehiclelist.cpp # src/window_type.h
This commit is contained in:
@@ -679,12 +679,12 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
||||
YapfNotifyTrackLayoutChange(tile_start, track);
|
||||
}
|
||||
|
||||
/* for human player that builds the bridge he gets a selection to choose from bridges (DC_QUERY_COST)
|
||||
* It's unnecessary to execute this command every time for every bridge. So it is done only
|
||||
* and cost is computed in "bridge_gui.c". For AI, Towns this has to be of course calculated
|
||||
*/
|
||||
/* Human players that build bridges get a selection to choose from (DC_QUERY_COST)
|
||||
* It's unnecessary to execute this command every time for every bridge.
|
||||
* So it is done only for humans and cost is computed in bridge_gui.cpp.
|
||||
* For (non-spectated) AI, Towns this has to be of course calculated. */
|
||||
Company *c = Company::GetIfValid(company);
|
||||
if (!(flags & DC_QUERY_COST) || (c != nullptr && c->is_ai)) {
|
||||
if (!(flags & DC_QUERY_COST) || (c != nullptr && c->is_ai && company != _local_company)) {
|
||||
bridge_len += 2; // begin and end tiles/ramps
|
||||
|
||||
switch (transport_type) {
|
||||
@@ -2318,9 +2318,8 @@ static bool ClickTile_TunnelBridge(TileIndex tile)
|
||||
/* Show vehicles found in tunnel. */
|
||||
if (IsTunnelTile(tile)) {
|
||||
int count = 0;
|
||||
const Train *t;
|
||||
TileIndex tile_end = GetOtherTunnelBridgeEnd(tile);
|
||||
FOR_ALL_TRAINS(t) {
|
||||
for (const Train *t : Train::Iterate()) {
|
||||
if (!t->IsFrontEngine()) continue;
|
||||
if (tile == t->tile || tile_end == t->tile) {
|
||||
ShowVehicleViewWindow(t);
|
||||
|
Reference in New Issue
Block a user