diff --git a/Source/CHANGES.md b/Source/CHANGES.md new file mode 100644 index 0000000..064bfcd --- /dev/null +++ b/Source/CHANGES.md @@ -0,0 +1,2 @@ +### 1.0.3 dev +- [Enhacement] Don't act if UI or vessel switch input is locked. diff --git a/Source/Controller.cs b/Source/Controller.cs index b56df3b..17122dc 100644 --- a/Source/Controller.cs +++ b/Source/Controller.cs @@ -135,8 +135,11 @@ void OnGUI() { /// Overridden from MonoBehavior. /// Tracks keys and mouse moveement. void Update() { - // Cancel any selection if game is paused or time warped. Block UI as well. - if (Mathf.Approximately(Time.timeScale, 0f) || Time.timeScale > 1f) { + // Cancel any selection if game is paused or time warped. Also check if vessel swicthing or UI + // in general are locked, this is a sign that some other plugin is being actively interacting + // with input. Cancel all EVS activities if it's the case. + if (Mathf.Approximately(Time.timeScale, 0f) || Time.timeScale > 1f + || InputLockManager.IsLocked(ControlTypes.UI | ControlTypes.VESSEL_SWITCHING)) { if (hoveredVessel != null) { SetHoveredVessel(null); }