Esempio n. 1
0
        public static NetworkLink <ISatellite> GetLink(ISatellite sat_a, ISatellite sat_b)
        {
            if (sat_a == null || sat_b == null || sat_a == sat_b)
            {
                return(null);
            }
            if (sat_a.IsInRadioBlackout || sat_b.IsInRadioBlackout)
            {
                return(null);
            }
            bool los = sat_a.HasLineOfSightWith(sat_b) || RTSettings.Instance.IgnoreLineOfSight;

            if (!los)
            {
                return(null);
            }

            switch (RTSettings.Instance.RangeModelType)
            {
            case RangeModel.RangeModel.Additive:     // NathanKell
                return(RangeModelRoot.GetLink(sat_a, sat_b));

            default:     // Stock range model
                return(RangeModelStandard.GetLink(sat_a, sat_b));
            }
        }
Esempio n. 2
0
        public static NetworkLink <ISatellite> GetLink(ISatellite sat_a, ISatellite sat_b)
        {
            if (sat_a == null || sat_b == null || sat_a == sat_b)
            {
                return(null);
            }
            bool los = sat_a.HasLineOfSightWith(sat_b) || CheatOptions.InfinitePropellant;

            if (!los)
            {
                return(null);
            }

            switch (RTSettings.Instance.RangeModelType)
            {
            case RangeModel.RangeModel.Additive:     // NathanKell
                return(RangeModelRoot.GetLink(sat_a, sat_b));

            default:     // Stock range model
                return(RangeModelStandard.GetLink(sat_a, sat_b));
            }
        }