File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -764,11 +764,24 @@ public void HideCurrentKerbal(bool hidden)
764
764
// This won't unhide a helmet hidden elsewhere.
765
765
if ( ActiveKerbal != null )
766
766
{
767
+ // Since the held prop is a child of the camera, and the camera is a child of the kerbal, make sure we
768
+ // don't accidentally hide the held prop too.
769
+ Transform oldHeldPropParent = PhysicalProp . HeldProp ? . transform . parent ;
770
+ if ( oldHeldPropParent != null )
771
+ {
772
+ PhysicalProp . HeldProp . transform . SetParent ( null , true ) ;
773
+ }
774
+
767
775
Renderer [ ] renderers = ActiveKerbal . KerbalRef . GetComponentsInChildren < Renderer > ( ) ;
768
776
foreach ( var r in renderers )
769
777
{
770
778
r . enabled = ! hidden ;
771
779
}
780
+
781
+ if ( oldHeldPropParent != null )
782
+ {
783
+ PhysicalProp . HeldProp . transform . SetParent ( oldHeldPropParent , true ) ;
784
+ }
772
785
}
773
786
774
787
if ( ! hidden )
You can’t perform that action at this time.
0 commit comments