1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 04:29:09 +00:00

(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
This commit is contained in:
tron
2006-06-19 17:22:57 +00:00
parent c61b617a16
commit 431baba8fe
5 changed files with 17 additions and 8 deletions

View File

@@ -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;