Merge branch 'signal_tunnels_bridges' into signal_tunnels_bridges-sx

This commit is contained in:
Jonathan G Rennison 2015-08-16 17:33:11 +01:00
commit a5f00c1df5

View File

@ -1018,7 +1018,9 @@ CommandCost CmdBuildSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (IsTileType(tile, MP_TUNNELBRIDGE)) {
if (GetTunnelBridgeTransportType(tile) != TRANSPORT_RAIL) return CMD_ERROR;
CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track);
//if (ret.Failed()) return ret;
if (ret.Failed()) return ret;
ret = EnsureNoTrainOnTrack(tile, track);
if (ret.Failed()) return ret;
} else if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) {
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);
}
@ -1485,6 +1487,8 @@ CommandCost CmdRemoveSingleSignal(TileIndex tile, DoCommandFlag flags, uint32 p1
CommandCost ret = EnsureNoTrainOnTrack(GetOtherTunnelBridgeEnd(tile), track);
if (ret.Failed()) return ret;
ret = EnsureNoTrainOnTrack(tile, track);
if (ret.Failed()) return ret;
} else {
if (!ValParamTrackOrientation(track) || !IsPlainRailTile(tile) || !HasTrack(tile, track)) {
return_cmd_error(STR_ERROR_THERE_IS_NO_RAILROAD_TRACK);