Skip to content

Commit 3310355

Browse files
committed
Fix #26: respect input locks when checking for C key
-fixes toggling PCR when typing in a KOS terminal window
1 parent ebf337d commit 3310355

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ProbeControlRoom/ProbeControlRoom.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ public void LateUpdate()
589589
{
590590
if (isActive)
591591
{
592-
bool canChangeCameras = !MapView.MapIsEnabled && !kerbalWasUnbuckled;
592+
bool canChangeCameras = !MapView.MapIsEnabled && !kerbalWasUnbuckled && InputLockManager.GetControlLock("kOSTerminal") == ControlTypes.None;
593593

594594
if (CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.Flight)
595595
{
@@ -630,12 +630,9 @@ public void LateUpdate()
630630
else
631631
{
632632
// if pressing the camera mode (C) button and we either failed to enter IVA mode or just left it, then try to start PCR mode
633-
if (!GameSettings.MODIFIER_KEY.GetKey() && GameSettings.CAMERA_MODE.GetKeyDown() && CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.Flight && !ThroughTheEyes.IsFirstPerson)
633+
if (!InputLockManager.IsLocked(ControlTypes.CAMERAMODES) && !GameSettings.MODIFIER_KEY.GetKey() && GameSettings.CAMERA_MODE.GetKeyDown() && CameraManager.Instance.currentCameraMode == CameraManager.CameraMode.Flight && !ThroughTheEyes.IsFirstPerson)
634634
{
635-
//if (FlightGlobals.ActiveVessel?.GetCrewCount() == 0)
636-
{
637-
startIVA();
638-
}
635+
startIVA();
639636
}
640637
}
641638

0 commit comments

Comments
 (0)