Skip to content

Commit ab52796

Browse files
Add flight computer check on no maneuver node to execute
1 parent 20e0f61 commit ab52796

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/RemoteTech/FlightComputer/Commands/ManeuverCommand.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ public override bool Pop(FlightComputer f)
5353
}
5454

5555
if (this.Node.solver == null) // need to repair (due to the scenario of 2 vessels within phyical range)
56+
{
57+
if (f.Vessel.patchedConicSolver.maneuverNodes.Count < 1) // no nodes
58+
{
59+
RTUtil.ScreenMessage("[Flight Computer]: No maneuver node to execute.");
60+
return false;
61+
}
62+
5663
this.Node = f.Vessel.patchedConicSolver.maneuverNodes.Find(x => x.UT == this.Node.UT);
64+
}
5765

5866
var burn = f.ActiveCommands.FirstOrDefault(c => c is BurnCommand);
5967
if (burn != null) {

0 commit comments

Comments
 (0)