mirror of https://github.com/OpenTTD/OpenTTD
(svn r9951) -Fix: slope check was incomplete when building road over tram track (and vice-versa)
-Fix: you could build a drive-through station over a sloped road/tram trackrelease/0.6
parent
8602acc433
commit
8c9b4ee548
|
@ -358,9 +358,9 @@ int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
switch (GetRoadTileType(tile)) {
|
switch (GetRoadTileType(tile)) {
|
||||||
case ROAD_TILE_NORMAL:
|
case ROAD_TILE_NORMAL:
|
||||||
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
|
if (HasRoadWorks(tile)) return_cmd_error(STR_ROAD_WORKS_IN_PROGRESS);
|
||||||
|
all_bits = GetAllRoadBits(tile);
|
||||||
if (!HASBIT(GetRoadTypes(tile), rt)) break;
|
if (!HASBIT(GetRoadTypes(tile), rt)) break;
|
||||||
|
|
||||||
all_bits = GetAllRoadBits(tile);
|
|
||||||
existing = GetRoadBits(tile, rt);
|
existing = GetRoadBits(tile, rt);
|
||||||
if ((existing & pieces) == pieces) {
|
if ((existing & pieces) == pieces) {
|
||||||
return_cmd_error(STR_1007_ALREADY_BUILT);
|
return_cmd_error(STR_1007_ALREADY_BUILT);
|
||||||
|
|
|
@ -1279,10 +1279,9 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
||||||
|
|
||||||
/* Do not remove roadtypes! */
|
/* Do not remove roadtypes! */
|
||||||
rts |= cur_rts;
|
rts |= cur_rts;
|
||||||
} else {
|
|
||||||
cost = CheckFlatLandBelow(tile, 1, 1, flags, is_drive_through ? 5 << p1 : 1 << p1, NULL);
|
|
||||||
if (CmdFailed(cost)) return cost;
|
|
||||||
}
|
}
|
||||||
|
cost = CheckFlatLandBelow(tile, 1, 1, flags, is_drive_through ? 5 << p1 : 1 << p1, NULL);
|
||||||
|
if (CmdFailed(cost)) return cost;
|
||||||
|
|
||||||
Station *st = NULL;
|
Station *st = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue