summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-07-14 18:14:08 +0000
committertruelight <truelight@openttd.org>2006-07-14 18:14:08 +0000
commit26e1e8ce6175abf25afaa927de570035260c7b06 (patch)
treedbd3c389611d1bc4d1ff1c024d38891fc96634ef /rail_cmd.c
parent5606e6d7b659ae18908f0dc46d3fd2ef3e4e7d42 (diff)
downloadopenttd-26e1e8ce6175abf25afaa927de570035260c7b06.tar.xz
(svn r5497) -Fix: somehow in r5315 slipped some wrong logic, allowed you to build rail on all road pieces without really building it ;)
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 7935efc85..a8ed559ed 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -286,15 +286,13 @@ int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!EnsureNoVehicle(tile)) return CMD_ERROR;
- if (GetRoadTileType(tile) == ROAD_TILE_NORMAL) {
- if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
-
- 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));
- }
+ if (GetRoadTileType(tile) == ROAD_TILE_NORMAL &&
+ ((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;
}