Skip to content

Commit

Permalink
fix #397: reset camera if iva kerbal is destroyed for some reason
Browse files Browse the repository at this point in the history
-fixes camera breaking when kerbal dies while walking around in a different part
  • Loading branch information
JonnyOThan committed Nov 11, 2024
1 parent 3c37c42 commit 7a14e6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions FreeIva/KerbalIvaAddon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ public void Update()
ReturnToSeat();
}

// if the kerbal disappeared somehow (generally from dying in a separate part), reset the camera
if (!buckled && ActiveKerbal.KerbalRef == null)
{
ReturnToSeat();
CameraManager.Instance.SetCameraFlight();
}

if (CameraManager.Instance.currentCameraMode != CameraManager.CameraMode.IVA)
{
GuiTutorial.Active = false;
Expand Down

0 comments on commit 7a14e6b

Please sign in to comment.