diff --git a/HullCamera/MuMechModuleHullCamera.cs b/HullCamera/MuMechModuleHullCamera.cs index fc04d10..1da7d58 100644 --- a/HullCamera/MuMechModuleHullCamera.cs +++ b/HullCamera/MuMechModuleHullCamera.cs @@ -550,10 +550,16 @@ public void EnableCamera() { return; } + + if (camActive) + { + LeaveCamera(); + camActive = false; + } + camEnabled = !camEnabled; Events["EnableCamera"].guiName = camEnabled ? locDisableCam : locEnableCam; - DirtyWindow(); } @@ -576,6 +582,13 @@ public void DeactivateCameraAction(KSPActionParam ap) { return; } + + if (camActive) + { + LeaveCamera(); + camActive = false; + } + camEnabled = !camEnabled; Events["EnableCamera"].guiName = camEnabled ? locDeactivateCamera : locActivateCamera; DirtyWindow();