Merge branch 'signal_tunnels_bridges' into jgrpp
This commit is contained in:
@@ -346,7 +346,6 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
||||
int z_end;
|
||||
Slope tileh_start = GetTileSlope(tile_start, &z_start);
|
||||
Slope tileh_end = GetTileSlope(tile_end, &z_end);
|
||||
bool pbs_reservation = false;
|
||||
|
||||
CommandCost terraform_cost_north = CheckBridgeSlopeNorth(direction, &tileh_start, &z_start);
|
||||
CommandCost terraform_cost_south = CheckBridgeSlopeSouth(direction, &tileh_end, &z_end);
|
||||
@@ -401,11 +400,6 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
||||
if (is_new_owner) owner = company;
|
||||
|
||||
switch (transport_type) {
|
||||
case TRANSPORT_RAIL:
|
||||
/* Keep the reservation, the path stays valid. */
|
||||
pbs_reservation = HasTunnelBridgeReservation(tile_start);
|
||||
break;
|
||||
|
||||
case TRANSPORT_ROAD:
|
||||
/* Do not remove road types when upgrading a bridge */
|
||||
roadtypes |= GetRoadTypes(tile_start);
|
||||
@@ -528,10 +522,8 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
||||
case TRANSPORT_RAIL:
|
||||
/* Add to company infrastructure count if required. */
|
||||
if (is_new_owner && c != NULL) c->infrastructure.rail[railtype] += (bridge_len + 2) * TUNNELBRIDGE_TRACKBIT_FACTOR;
|
||||
MakeRailBridgeRamp(tile_start, owner, bridge_type, dir, railtype);
|
||||
MakeRailBridgeRamp(tile_end, owner, bridge_type, ReverseDiagDir(dir), railtype);
|
||||
SetTunnelBridgeReservation(tile_start, pbs_reservation);
|
||||
SetTunnelBridgeReservation(tile_end, pbs_reservation);
|
||||
MakeRailBridgeRamp(tile_start, owner, bridge_type, dir, railtype, is_upgrade);
|
||||
MakeRailBridgeRamp(tile_end, owner, bridge_type, ReverseDiagDir(dir), railtype, is_upgrade);
|
||||
break;
|
||||
|
||||
case TRANSPORT_ROAD: {
|
||||
|
Reference in New Issue
Block a user