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 _); } }
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 _); } }
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 _); } }