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
5 changes: 4 additions & 1 deletion MechJeb2/MechJebModuleStagingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ public override void OnFixedUpdate()
if (HasFairing(Vessel.currentStage - 1) && !WaitingForFairing())
{
Stage();
return;
}
else
{
Expand Down Expand Up @@ -319,6 +320,7 @@ public override void OnFixedUpdate()
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 @@ -339,6 +341,7 @@ public override void OnFixedUpdate()
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 @@ -478,7 +481,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
Loading