FirstPersonKSP / KSP-ProbeControlRoom

ProbeControlRoom for KerbalSpaceProgram
Other
4 stars 5 forks source link

Fixes PCR disappearing on staging/docking #22

Closed Kam1ni closed 1 year ago

Kam1ni commented 1 year ago

Fixes #14.

I had to fix this one as it was the only one preventing me from enjoying Kerbal VR.

I believe it was caused because when you enter PCR. All Kerbal portraits are being removed. So when you stage. The game sees there are no kerbals and it kicks you out.

My solution is to add the portraits when you enter PCR instead. As the portraits are hidden anyway when in IVA. They're also removed again when exiting.

A note on that. For some reason KerbalPortraitGallery.Instance.UnregisterActiveCrew did not do anything. But removing the crew member directly from KerbalPortraitGallery.Instance.ActiveCrewItems by index seems to have done the trick.

I tested it in both with and without a command module with kerbals attached and it all seems to work.

JonnyOThan commented 1 year ago

Thanks for the PR, but I found a simpler fix!