Plane: fixed above_location_current() for non-terrain alt

thanks to Lekston for finding the bug (PR#2610)
This commit is contained in:
Andrew Tridgell 2015-07-29 08:20:23 +10:00 committed by Randy Mackay
parent 3a7cc03f67
commit 8a975015b5

View File

@ -398,8 +398,8 @@ bool Plane::above_location_current(const Location &loc)
#endif #endif
float loc_alt_cm = loc.alt; float loc_alt_cm = loc.alt;
if (!loc.flags.relative_alt) { if (loc.flags.relative_alt) {
loc_alt_cm -= home.alt; loc_alt_cm += home.alt;
} }
return current_loc.alt > loc_alt_cm; return current_loc.alt > loc_alt_cm;
} }