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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user