Skip to content
Open
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
4 changes: 3 additions & 1 deletion MechJeb2/MechJebModuleStagingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public override void OnUpdate()
if (!InverseStageHasActiveEngines(Vessel.currentStage))
{
Stage();
return;
}

// prevent staging when the current stage has active engines and the next stage has any engines (but not decouplers or clamps)
Expand All @@ -324,6 +325,7 @@ public override void OnUpdate()
if (InverseStageDecouplesDeactivatedEngineOrTank(Vessel.currentStage - 1))
{
Stage();
return;
}

// only decouple fairings if the dynamic pressure, altitude, and aerothermal flux conditions are respected
Expand Down Expand Up @@ -453,7 +455,7 @@ private double LastNonZeroDVStageBurnTime()
private bool InverseStageHasActiveEngines(int inverseStage)
{
foreach (ModuleEngines engine in _allModuleEngines)
if (engine.part.inverseStage == inverseStage && engine.EngineHasFuel())
if (engine.part.inverseStage >= inverseStage && engine.EngineHasFuel())
return true;
return false;
}
Expand Down