Skip to content

Commit

Permalink
Fix missing checks for dead avionics
Browse files Browse the repository at this point in the history
  • Loading branch information
siimav committed Nov 17, 2024
1 parent a5031da commit a09c76c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/RP0/Avionics/ControlLockerUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static LockLevel ShouldLock(List<Part> parts, bool countClamps, out float
if (ecResource > 0 || HighLogic.LoadedSceneIsEditor)
{
partAvionicsMass += mA.CurrentMassLimit;
axial |= mA.allowAxial;
axial |= !mA.dead && mA.allowAxial;
isLimitedByNonInterplanetary |= mA.IsNearEarthAndLockedByInterplanetary;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/RP0/Avionics/ModuleAvionics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public bool IsLockedByInterplanetary
/// <summary>
/// Whether the avionics is NE with controllable mass > 0 and control is being locked by being interplanetary.
/// </summary>
public bool IsNearEarthAndLockedByInterplanetary => GetInternalMassLimit() > 0 && IsLockedByInterplanetary;
public bool IsNearEarthAndLockedByInterplanetary => !dead && GetInternalMassLimit() > 0 && IsLockedByInterplanetary;

/// <summary>
/// The altitude threshold around home world above which interplanetary avionics is required.
Expand Down

0 comments on commit a09c76c

Please sign in to comment.