Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions MechJeb2/MechJebModuleStagingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -748,10 +748,15 @@ private bool HasActiveOrIdleEngineOrTankDescendant(Part p, List<int> tankResourc
if (p is null)
return false;

if (!p.IsSepratron() && !IsBurnedOutSrbDecoupledInNextStage(p))
if (!IsBurnedOutSrbDecoupledInNextStage(p))
{
if ((p.State == PartStates.ACTIVE || p.State == PartStates.IDLE) && p.EngineHasFuel() && !p.IsUnrestartableDeadEngine() &&
!EnginesHaveDropTanks(p))
// a sepratron is not an engine that holds the stage, but its part can still be a drop tank feeding engines
// that are (a booster tank with a built-in separation motor, e.g. the R-7 blocks B/V/G/D). Running engines
// with drop tanks defer to those tanks (EnginesHaveDropTanks), so skipping the tanks here as well would leave
// nothing holding the stage. A real sepratron's own fuel is never matched below: its engine is not in
// activeModuleEngines.
if (!p.IsSepratron() && (p.State == PartStates.ACTIVE || p.State == PartStates.IDLE) && p.EngineHasFuel() &&
!p.IsUnrestartableDeadEngine() && !EnginesHaveDropTanks(p))
{
return true; // TODO: properly check if ModuleEngines is active
}
Expand Down
Loading