Example #1
0
        private void HandleVesselUpdates()
        {
            if (!PositionUpdateSystemBasicReady)
            {
                return;
            }

            foreach (var keyVal in CurrentVesselUpdate)
            {
                if (!VesselCommon.DoVesselChecks(keyVal.Key))
                {
                    RemoveVesselFromSystem(keyVal.Key);
                }

                if (SettingsSystem.CurrentSettings.InterpolationEnabled)
                {
                    keyVal.Value.ApplyInterpolatedVesselUpdate();
                }
                else
                {
                    keyVal.Value.ApplyVesselUpdate();
                }
            }

            while (VesselsToRemove.Count > 0)
            {
                var vesselToRemove = VesselsToRemove.Dequeue();
                TargetVesselUpdate.TryRemove(vesselToRemove, out _);
                CurrentVesselUpdate.TryRemove(vesselToRemove, out _);
                TargetVesselUpdateQueue.TryRemove(vesselToRemove, out _);
            }
        }
Example #2
0
        private static void HandleVesselUpdates()
        {
            foreach (var keyVal in CurrentVesselUpdate)
            {
                keyVal.Value.ApplyVesselUpdate();
            }

            while (VesselsToRemove.Count > 0)
            {
                var vesselToRemove = VesselsToRemove.Dequeue();
                TargetVesselUpdate.TryRemove(vesselToRemove, out _);
                CurrentVesselUpdate.TryRemove(vesselToRemove, out _);
            }
        }
Example #3
0
        private static void HandleVesselUpdates()
        {
            if (FlightGlobals.ActiveVessel == null)
            {
                return;
            }

            foreach (var keyVal in CurrentVesselUpdate)
            {
                keyVal.Value.ApplyVesselUpdate();
                //FlightGlobals.ActiveVessel.StartCoroutine(ApplyVesselUpdate(keyVal.Value));
            }

            while (VesselsToRemove.Count > 0)
            {
                var vesselToRemove = VesselsToRemove.Dequeue();
                TargetVesselUpdate.TryRemove(vesselToRemove, out _);
                CurrentVesselUpdate.TryRemove(vesselToRemove, out _);
            }
        }
Example #4
0
        private void HandleVesselUpdates()
        {
            if (!PositionUpdateSystemBasicReady)
            {
                return;
            }

            foreach (var keyVal in CurrentVesselUpdate)
            {
                if (!DoVesselChecks(keyVal.Key))
                {
                    RemoveVesselFromSystem(keyVal.Key);
                }

                keyVal.Value.ApplyVesselUpdate();
            }

            while (VesselsToRemove.Count > 0)
            {
                var vesselToRemove = VesselsToRemove.Dequeue();
                TargetVesselUpdate.TryRemove(vesselToRemove, out _);
                CurrentVesselUpdate.TryRemove(vesselToRemove, out _);
            }
        }
Example #5
0
 /// <summary>
 /// Removes a vessel from the system
 /// </summary>
 public void RemoveVessel(Guid vesselId)
 {
     CurrentVesselUpdate.TryRemove(vesselId, out _);
     TargetVesselUpdateQueue.TryRemove(vesselId, out _);
 }