diff --git a/Source-Code/FlareDraw.cs b/Source-Code/FlareDraw.cs index d66ce0b..d3bc651 100644 --- a/Source-Code/FlareDraw.cs +++ b/Source-Code/FlareDraw.cs @@ -7,7 +7,7 @@ namespace DistantObject { [KSPAddon(KSPAddon.Startup.Flight, false)] - class FlareDraw : MonoBehaviour + public class FlareDraw : MonoBehaviour { private static Dictionary vesselMeshLookup = new Dictionary(); private static Dictionary meshVesselLookup = new Dictionary(); @@ -25,6 +25,8 @@ class FlareDraw : MonoBehaviour private static float atmosphereFactor = 1.0f; private static float dimFactor = 1.0f; + private static bool ExternalControl = false; + private List situations = new List(); private string showNameString = null; @@ -217,7 +219,11 @@ private static void CheckDraw(GameObject flareMesh, Vector3d position, Celestial private void UpdateVar() { camPos = FlightCamera.fetch.mainCamera.transform.position; - camFOV = FlightCamera.fetch.mainCamera.fieldOfView; + + if (!ExternalControl) + { + camFOV = FlightCamera.fetch.mainCamera.fieldOfView; + } foreach (CelestialBody body in FlightGlobals.Bodies) { @@ -506,5 +512,18 @@ private System.Collections.IEnumerator StartUp() } } } + + public static void SetFOV(float FOV) + { + if (ExternalControl) + { + camFOV = FOV; + } + } + + public static void SetExternalFOVControl(bool Control) + { + ExternalControl = Control; + } } }