1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 18:39:10 +00:00

(svn r9999) -Feature: make it possible to disallow busses and lorries to go a specific way on straight pieces of road.

This commit is contained in:
rubidium
2007-05-31 15:15:00 +00:00
parent a02417645e
commit 253aa1b0b0
12 changed files with 151 additions and 18 deletions

View File

@@ -485,6 +485,8 @@ int32 CmdTurnRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
return CMD_ERROR;
}
if (GetDisallowedRoadDirections(v->tile) != DRD_NONE) return CMD_ERROR;
if (IsTunnelTile(v->tile) && DirToDiagDir(v->direction) == GetTunnelDirection(v->tile)) return CMD_ERROR;
if (IsBridgeTile(v->tile) && DirToDiagDir(v->direction) == GetBridgeRampDirection(v->tile)) return CMD_ERROR;
@@ -1415,6 +1417,9 @@ again:
v->cur_speed = 0;
return;
}
} else if (GetDisallowedRoadDirections(v->tile) != DRD_NONE) {
v->cur_speed = 0;
return;
} else {
tile = v->tile;
}