Skip to content

Commit

Permalink
even more betterer reflection
Browse files Browse the repository at this point in the history
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Jul 10, 2023
1 parent fcb566a commit b381fcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MechJeb2/MechJebLib/Simulations/SimVesselUpdater.cs
Expand Up @@ -224,8 +224,8 @@ private static void UpdateProceduralFairingDecoupler(SimProceduralFairingDecoupl
if (_pfDecoupled == null) return;

object fieldVal = _pfDecoupled.GetValue(kspPartModule);
if (fieldVal != null && fieldVal is bool)
decoupler.IsDecoupled = (bool)fieldVal;
if (fieldVal is bool boolVal)
decoupler.IsDecoupled = boolVal;
}
}
}
Expand Down

0 comments on commit b381fcd

Please sign in to comment.