diff options
author | tron <tron@openttd.org> | 2006-06-19 17:22:57 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-19 17:22:57 +0000 |
commit | 431baba8fed63c52ba11fffc2a1242248a5830db (patch) | |
tree | 96b559696bd3fbcc26188de4966bf22e7a6d82cc /tunnelbridge_cmd.c | |
parent | c61b617a169d2e98648f11288e45bab0080d9cc5 (diff) | |
download | openttd-431baba8fed63c52ba11fffc2a1242248a5830db.tar.xz |
(svn r5315) -Fix: Prohibit altering a road tile while road works are in progress
This fixes some glitches like "turning" the excavation by adding/removing road bits or removing the road piece
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 067db215b..b6034db69 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -343,8 +343,9 @@ int32 CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2) break; case MP_STREET: - if (GetRoadTileType(tile) != ROAD_TILE_NORMAL || - GetRoadBits(tile) != (direction == AXIS_X ? ROAD_Y : ROAD_X)) { + if (GetRoadTileType(tile) != ROAD_TILE_NORMAL) goto not_valid_below; + if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS); + if (GetRoadBits(tile) != (direction == AXIS_X ? ROAD_Y : ROAD_X)) { goto not_valid_below; } transport_under = TRANSPORT_ROAD; |