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