Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        public static bool CheckLaneConnection(uint from, uint to)
        {
            Lane lane = GetLane(from);

            return(lane.ConnectsTo(to));
        }