mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
Merge branch 'signal_tunnels_bridges-sx' into jgrpp
This commit is contained in:
commit
55af40c456
@ -1019,7 +1019,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);
|
||||
}
|
||||
@ -1492,6 +1494,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);
|
||||
|
Loading…
Reference in New Issue
Block a user