Skip to content

Commit 421e6ab

Browse files
committed
don't swap seats if the modifier (alt) key is also pressed
make sure we fire OnIVACameraKerbalChange when swapping seats
1 parent c8334f3 commit 421e6ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ProbeControlRoom/ProbeControlRoom.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,13 @@ public void LateUpdate()
609609
}
610610
}
611611
// Cycle to the next kerbal
612-
else if (canChangeCameras && GameSettings.CAMERA_NEXT.GetKeyDown(false))
612+
else if (canChangeCameras && !GameSettings.MODIFIER_KEY.GetKey() && GameSettings.CAMERA_NEXT.GetKeyDown(false))
613613
{
614614
// the normal IVA kerbal cycling code uses the crew on the vessel, but the kerbals in the PCR are not in the vessel!
615615
int currentIndex = aPart.internalModel.seats.FindIndex(seat => seat.kerbalRef == CameraManager.Instance.IVACameraActiveKerbal);
616616
int nextIndex = (currentIndex + 1) % aPart.internalModel.seats.Count;
617617
CameraManager.Instance.SetCameraIVA(aPart.internalModel.seats[nextIndex].kerbalRef, true);
618+
GameEvents.OnIVACameraKerbalChange.Fire(aPart.internalModel.seats[nextIndex].kerbalRef); // the stock code doesn't fire this, so we need to
618619

619620
// stock bug: SetCameraIVA turns off the head renderers and then calls InternalModel.SetVisible, which enables all renderers in the IVA and turns the heads back on
620621
CameraManager.Instance.IVACameraActiveKerbal.IVAEnable(true);

0 commit comments

Comments
 (0)