DU: Fix ND path drawing error for last WP, thanks to Necolatis for finding this!

This commit is contained in:
Joshua Davidson 2019-02-06 16:10:11 -05:00
parent 446f95a5a7
commit 44a5bdc653

View file

@ -74,12 +74,12 @@ var searchCmd = func {
path = [{},{lon:leg.wp_lon, lat:leg.wp_lat}];
else
path = leg.path();
if(i == (fpSize - 1) and !discontinuity){# WORKAROUND FOR FG BUG
var ltype = leg.wp_type;
var path_l = size(path);
if(ltype != 'runway' and path_l >= 2)
path = subvec(path, 0, 1) ~ subvec(path, path_l - 1, 1);
}
# if(i == (fpSize - 1) and !discontinuity){# WORKAROUND FOR FG BUG -- we don't need it anymore (I think)!
# var ltype = leg.wp_type;
# var path_l = size(path);
# if(ltype != 'runway' and path_l >= 2)
# path = subvec(path, 0, 1) ~ subvec(path, path_l - 1, 1);
# }
coords ~= path;
discontinuity = driver.hasDiscontinuity(idx, leg);
}