From 7acee14b42b4ce671f169772ff93ddeca97f90c7 Mon Sep 17 00:00:00 2001 From: siimav Date: Wed, 28 Jun 2023 20:10:50 +0300 Subject: [PATCH] Fix submergedDynamicPressurekPa and dynamicPressurekPa not getting set to 0 when part becomes shielded --- .../FARAeroComponents/ModularFlightIntegratorRegisterer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FerramAerospaceResearch/FARAeroComponents/ModularFlightIntegratorRegisterer.cs b/FerramAerospaceResearch/FARAeroComponents/ModularFlightIntegratorRegisterer.cs index 78564765..5b5c7775 100644 --- a/FerramAerospaceResearch/FARAeroComponents/ModularFlightIntegratorRegisterer.cs +++ b/FerramAerospaceResearch/FARAeroComponents/ModularFlightIntegratorRegisterer.cs @@ -122,6 +122,8 @@ private static void UpdateAerodynamics(ModularFlightIntegrator fi, Part part) part.dragVectorSqrMag = part.dragVector.sqrMagnitude; if (part.dragVectorSqrMag.NearlyEqual(0) || part.ShieldedFromAirstream) { + part.submergedDynamicPressurekPa = 0; + part.dynamicPressurekPa = 0; part.dragVectorMag = 0f; part.dragVectorDir = Vector3.zero; part.dragVectorDirLocal = Vector3.zero;