mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r5500) Undo r4597, because it breaks the intended change of r5315 to prohibit building rails on a road tile while road works are in progress
This commit is contained in:
parent
26e1e8ce61
commit
43b9204d42
16
rail_cmd.c
16
rail_cmd.c
|
@ -286,14 +286,16 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
|
|
||||||
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
|
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
|
||||||
|
|
||||||
if (GetRoadTileType(tile) == ROAD_TILE_NORMAL &&
|
if (GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
|
||||||
((track == TRACK_X && GetRoadBits(tile) == ROAD_Y) ||
|
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
|
||||||
(track == TRACK_Y && GetRoadBits(tile) == ROAD_X))) {
|
|
||||||
if (flags & DC_EXEC) {
|
|
||||||
MakeRoadCrossing(tile, GetTileOwner(tile), _current_player, (track == TRACK_X ? AXIS_Y : AXIS_X), p1, GetTownIndex(tile));
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
if ((track == TRACK_X && GetRoadBits(tile) == ROAD_Y) ||
|
||||||
|
(track == TRACK_Y && GetRoadBits(tile) == ROAD_X)) {
|
||||||
|
if (flags & DC_EXEC) {
|
||||||
|
MakeRoadCrossing(tile, GetTileOwner(tile), _current_player, (track == TRACK_X ? AXIS_Y : AXIS_X), p1, GetTownIndex(tile));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
|
if (IsLevelCrossing(tile) && GetCrossingRailBits(tile) == trackbit) {
|
||||||
|
|
Loading…
Reference in New Issue