コード例 #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 _);
            }
        }
コード例 #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 _);
            }
        }
コード例 #3
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 _);
            }
        }