private void SendRemainingVolume() { if (cachedVolume == float.MaxValue) { return; } Events[nameof(OnPartVolumeChanged)].active = false; InternalTanksVolume = SphericalTankUtilities.GetSphericalTankVolume(GetAvailableVolume()); SendVolumeChangedEvent(InternalTanksVolume); Events[nameof(OnPartVolumeChanged)].active = true; }
private void SendRemainingVolume() { if (_started && cachedVolume < float.MaxValue) { Events[nameof(OnPartVolumeChanged)].active = false; InternalTanksVolume = SphericalTankUtilities.GetSphericalTankVolume(GetAvailableVolume()); float availVol = GetAvailableVolume(); Log($"SendRemainingVolume(): Cached Volume: {cachedVolume}. AvionicsVolume: {GetAvionicsVolume()}. AvailableVolume: {availVol}. Internal Tanks: {InternalTanksVolume}"); SendVolumeChangedEvent(InternalTanksVolume); Events[nameof(OnPartVolumeChanged)].active = true; } }
private void SendRemainingVolume() { Profiler.BeginSample("RP0ProcAvi SendRemainingVolume"); if (_started && _cachedVolume < float.MaxValue) { Events[nameof(OnPartVolumeChanged)].active = false; InternalTanksVolume = SphericalTankUtilities.GetSphericalTankVolume(GetAvailableVolume()); float availVol = GetAvailableVolume(); Log($"SendRemainingVolume(): Cached Volume: {_cachedVolume}. AvionicsVolume: {GetAvionicsVolume()}. AvailableVolume: {availVol}. Internal Tanks: {InternalTanksVolume}"); SendVolumeChangedEvent(InternalTanksVolume); _rfPM?.CalculateMass(); Events[nameof(OnPartVolumeChanged)].active = true; } Profiler.EndSample(); }