@@ -352,32 +352,33 @@ int32 CmdBuildRoad(TileIndex tile, uint3
RoadBits pieces = Extract<RoadBits, 0>(p1);
RoadType rt = (RoadType)GB(p1, 4, 2);
if (!IsValidRoadType(rt)) return CMD_ERROR;
tileh = GetTileSlope(tile, NULL);
switch (GetTileType(tile)) {
case MP_STREET:
switch (GetRoadTileType(tile)) {
case ROAD_TILE_NORMAL:
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
all_bits = GetAllRoadBits(tile);
if (!HASBIT(GetRoadTypes(tile), rt)) break;
existing = GetRoadBits(tile, rt);
if ((existing & pieces) == pieces) {
return_cmd_error(STR_1007_ALREADY_BUILT);
}
break;
case ROAD_TILE_CROSSING:
if (HASBIT(GetRoadTypes(tile), rt)) return_cmd_error(STR_1007_ALREADY_BUILT);
all_bits = GetCrossingRoadBits(tile);
if (pieces & ComplementRoadBits(all_bits)) goto do_clear;
default:
case ROAD_TILE_DEPOT:
goto do_clear;