diff --git a/ConfigurableGridPoints/Data/Scripts/ShipPoints/HeartNetworking/HeartNetwork.cs b/ConfigurableGridPoints/Data/Scripts/ShipPoints/HeartNetworking/HeartNetwork.cs index d072a67..0851f65 100644 --- a/ConfigurableGridPoints/Data/Scripts/ShipPoints/HeartNetworking/HeartNetwork.cs +++ b/ConfigurableGridPoints/Data/Scripts/ShipPoints/HeartNetworking/HeartNetwork.cs @@ -44,15 +44,16 @@ public void UnloadData() { I = null; } - public void Update() - { + public void Update() { + if (MasterSession.I == null || Log.IsUnloaded) + return; + _networkLoadUpdate--; - if (_networkLoadUpdate <= 0) - { + if (_networkLoadUpdate <= 0) { _networkLoadUpdate = NetworkLoadTicks; TotalNetworkLoad = 0; - foreach (var networkLoadArray in TypeNetworkLoad.Keys.ToArray()) - { + + foreach (var networkLoadArray in TypeNetworkLoad.Keys.ToArray()) { TotalNetworkLoad += TypeNetworkLoad[networkLoadArray]; TypeNetworkLoad[networkLoadArray] = 0; }