1
0
Fork 0

Fix logic error in SID discontinuity logic

This commit is contained in:
Jonathan Redpath 2022-05-19 21:37:19 +01:00
parent ef17f979b8
commit c39fddb05b

View file

@ -75,9 +75,9 @@ var A320RouteManagerDelegate = {
}
me.flightplan.insertWaypoints(wps, 1);
for (var wpIdx = 0; wpIdx < me.flightplan.getPlanSize(); wpIdx = wpIdx + 1) {
if (me.flightplan.getWP(wpIdx).wp_type == "vectors" and (me.flightplan.getWP(wpIdx + 1) == nil or me.flightplan.getWP(wpIdx + 1).wp_type != "discontinuity")) {
if (me.flightplan.getWP(wpIdx).wp_type == "vectors" and me.flightplan.getWP(wpIdx + 1) != nil and me.flightplan.getWP(wpIdx + 1).wp_type != "discontinuity") {
me.flightplan.insertWP(createDiscontinuity(), wpIdx + 1);
}
}