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
parent 5c9d248407
commit 8f0e7e0693
1 changed files with 2 additions and 2 deletions

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;
} }