1
0
Fork 0

Crz wind bug fix

This commit is contained in:
Matthew Maring 2020-08-09 09:18:47 -04:00
parent 6f69dee2ac
commit e3266e5325

View file

@ -519,6 +519,7 @@ var windCRZPage = {
if (fmgc.flightPlanController.temporaryFlag[me.computer]) { if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
computer_temp = me.computer; computer_temp = me.computer;
} }
if (size(fmgc.windController.nav_indicies[computer_temp]) > 1) {
if (me.cur_location < size(fmgc.windController.nav_indicies[computer_temp]) - 1) { if (me.cur_location < size(fmgc.windController.nav_indicies[computer_temp]) - 1) {
me.cur_location = me.cur_location + 1; me.cur_location = me.cur_location + 1;
} else { } else {
@ -527,12 +528,14 @@ var windCRZPage = {
me.match_location = fmgc.windController.nav_indicies[computer_temp][me.cur_location]; me.match_location = fmgc.windController.nav_indicies[computer_temp][me.cur_location];
me.waypoint = fmgc.flightPlanController.flightplans[computer_temp].getWP(me.match_location); me.waypoint = fmgc.flightPlanController.flightplans[computer_temp].getWP(me.match_location);
me.reload(); me.reload();
}
}, },
pushButtonDown: func() { pushButtonDown: func() {
var computer_temp = 2; var computer_temp = 2;
if (fmgc.flightPlanController.temporaryFlag[me.computer]) { if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
computer_temp = me.computer; computer_temp = me.computer;
} }
if (size(fmgc.windController.nav_indicies[computer_temp]) > 1) {
if (me.cur_location > 0) { if (me.cur_location > 0) {
me.cur_location = me.cur_location - 1; me.cur_location = me.cur_location - 1;
} else { } else {
@ -542,4 +545,5 @@ var windCRZPage = {
me.waypoint = fmgc.flightPlanController.flightplans[computer_temp].getWP(me.match_location); me.waypoint = fmgc.flightPlanController.flightplans[computer_temp].getWP(me.match_location);
me.reload(); me.reload();
} }
}
}; };