public static bool CheckLaneConnection(this NetInfo.Lane laneInfo, ExtendedVehicleType vehicleType, uint from, uint to)
{
if ((vehicleType & sm_routedUnits) == 0)
{
return true;
}
if ((laneInfo.m_vehicleType & VehicleInfo.VehicleType.Car) == VehicleInfo.VehicleType.None)
{
return true;
}
// Quick fix for tram
if ((laneInfo.m_vehicleType & VehicleInfo.VehicleType.Tram) != VehicleInfo.VehicleType.None)
{
return true;
}
Lane lane = GetLane(from);
return lane.ConnectsTo(to);
}
#endregion