From 8abf5cd5b31b51cb1c3b7d53c2d4ba1c16c41fc1 Mon Sep 17 00:00:00 2001 From: Michael Billard Date: Wed, 30 May 2018 16:04:27 -0700 Subject: [PATCH 1/2] Make ModularVesselPrecalculate public Adds ability to call base class CalculateGravity too --- ModularVesselPrecalculate.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ModularVesselPrecalculate.cs b/ModularVesselPrecalculate.cs index de460ad..1e58521 100644 --- a/ModularVesselPrecalculate.cs +++ b/ModularVesselPrecalculate.cs @@ -3,7 +3,7 @@ namespace ModularFI { - class ModularVesselPrecalculate : VesselPrecalculate + public class ModularVesselPrecalculate : VesselPrecalculate { private float lastMainPhysics = 0; @@ -247,6 +247,11 @@ public override void CalculateGravity() base.CalculateGravity(); } + public void BaseCalculateGravity() + { + base.CalculateGravity(); + } + ///// ///// This will update pos/rot if landed/splashed and on rails ///// From 92a0e6dfd15c80f539e9c4bb7c5ce45100a01999 Mon Sep 17 00:00:00 2001 From: Michael Billard Date: Wed, 30 May 2018 16:12:24 -0700 Subject: [PATCH 2/2] Add method to return the vessel being pre-calculated --- ModularVesselPrecalculate.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ModularVesselPrecalculate.cs b/ModularVesselPrecalculate.cs index 1e58521..e18a610 100644 --- a/ModularVesselPrecalculate.cs +++ b/ModularVesselPrecalculate.cs @@ -252,6 +252,11 @@ public void BaseCalculateGravity() base.CalculateGravity(); } + public Vessel GetVessel() + { + return vessel; + } + ///// ///// This will update pos/rot if landed/splashed and on rails /////