diff --git a/RasterPropMonitor/Core/RPMVCEvaluators.cs b/RasterPropMonitor/Core/RPMVCEvaluators.cs index aa61ddec..36f176b0 100644 --- a/RasterPropMonitor/Core/RPMVCEvaluators.cs +++ b/RasterPropMonitor/Core/RPMVCEvaluators.cs @@ -67,18 +67,18 @@ internal double FallbackEvaluateDragForce() Vector3 bodyLift = p.transform.rotation * (p.bodyLiftScalar * p.DragCubes.LiftForce); bodyLift = Vector3.ProjectOnPlane(bodyLift, -p.dragVectorDir); pureLiftV += bodyLift; + } - for (int m = 0; m < p.Modules.Count; m++) + for (int m = 0; m < p.Modules.Count; m++) + { + PartModule pm = p.Modules[m]; + if (pm.isEnabled && pm is ModuleLiftingSurface) { - PartModule pm = p.Modules[m]; - if (pm.isEnabled && pm is ModuleLiftingSurface) + ModuleLiftingSurface liftingSurface = pm as ModuleLiftingSurface; + if (!p.ShieldedFromAirstream) { - ModuleLiftingSurface liftingSurface = pm as ModuleLiftingSurface; - if (!p.ShieldedFromAirstream) - { - pureLiftV += liftingSurface.liftForce; - pureDragV += liftingSurface.dragForce; - } + pureLiftV += liftingSurface.liftForce; + pureDragV += liftingSurface.dragForce; } } } @@ -129,18 +129,18 @@ internal double FallbackEvaluateLiftForce() Vector3 bodyLift = p.transform.rotation * (p.bodyLiftScalar * p.DragCubes.LiftForce); bodyLift = Vector3.ProjectOnPlane(bodyLift, -p.dragVectorDir); pureLiftV += bodyLift; + } - for (int m = 0; m < p.Modules.Count; m++) + for (int m = 0; m < p.Modules.Count; m++) + { + PartModule pm = p.Modules[m]; + if (pm.isEnabled && pm is ModuleLiftingSurface) { - PartModule pm = p.Modules[m]; - if (pm.isEnabled && pm is ModuleLiftingSurface) + ModuleLiftingSurface liftingSurface = pm as ModuleLiftingSurface; + if (!p.ShieldedFromAirstream) { - ModuleLiftingSurface liftingSurface = pm as ModuleLiftingSurface; - if (!p.ShieldedFromAirstream) - { - pureLiftV += liftingSurface.liftForce; - pureDragV += liftingSurface.dragForce; - } + pureLiftV += liftingSurface.liftForce; + pureDragV += liftingSurface.dragForce; } } } @@ -175,23 +175,23 @@ internal double FallbackEvaluateTerminalVelocity() Vector3 bodyLift = p.transform.rotation * (p.bodyLiftScalar * p.DragCubes.LiftForce); bodyLift = Vector3.ProjectOnPlane(bodyLift, -p.dragVectorDir); pureLiftV += bodyLift; + } - for (int m = 0; m < p.Modules.Count; m++) + for (int m = 0; m < p.Modules.Count; m++) + { + PartModule pm = p.Modules[m]; + if (!pm.isEnabled) { - PartModule pm = p.Modules[m]; - if (!pm.isEnabled) - { - continue; - } + continue; + } - if (pm is ModuleLiftingSurface) - { - ModuleLiftingSurface liftingSurface = (ModuleLiftingSurface)pm; - if (p.ShieldedFromAirstream) - continue; - pureLiftV += liftingSurface.liftForce; - pureDragV += liftingSurface.dragForce; - } + if (pm is ModuleLiftingSurface) + { + ModuleLiftingSurface liftingSurface = (ModuleLiftingSurface)pm; + if (p.ShieldedFromAirstream) + continue; + pureLiftV += liftingSurface.liftForce; + pureDragV += liftingSurface.dragForce; } } }