Skip to content

Commit

Permalink
Fix the longstanding launch to plane bug
Browse files Browse the repository at this point in the history
Should stop going to FINISHED when the vessel comes
out of warp.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed Jan 16, 2024
1 parent 01879c4 commit fa685a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions MechJeb2/MechJebModuleAscentBaseAutopilot.cs
Expand Up @@ -213,8 +213,11 @@ private void DriveAscent()
{
Debug.Log("Awaiting Liftoff");
Status = Localizer.Format("#MechJeb_Ascent_status6"); //"Awaiting liftoff"
// kill the optimizer if it is running.
Core.Guidance.Enabled = false;

if (TMinus > AscentSettings.WarpCountDown)
Core.Guidance.Enabled = false;
else
Core.Guidance.AssertStart(false);

Core.Attitude.SetAxisControl(false, false, false);
return;
Expand Down
2 changes: 1 addition & 1 deletion MechJeb2/MechJebModuleGuidanceController.cs
Expand Up @@ -75,7 +75,7 @@ protected override void OnModuleDisabled()
private bool _allowExecution;

// we wait until we get a signal to allow execution to start
public void AssertStart(bool allow_execution = true) => _allowExecution = allow_execution;
public void AssertStart(bool allowExecution = true) => _allowExecution = allowExecution;

public override void OnFixedUpdate()
{
Expand Down

0 comments on commit fa685a5

Please sign in to comment.