Skip to content

Commit

Permalink
Merge pull request #145 from siimav/PatchShielded
Browse files Browse the repository at this point in the history
Fix submergedDynamicPressurekPa and dynamicPressurekPa not getting set to 0 when part becomes shielded
  • Loading branch information
dkavolis authored Jun 28, 2023
2 parents 49449b5 + 7acee14 commit e8f9040
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8f9040

Please sign in to comment.