From: timoore Date: Sun, 23 Sep 2007 20:55:55 +0000 (+0000) Subject: Fix for runway search glitch X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=428acda9e83e8b7d5e6ae74ecc8fd22b6bbb4482;p=flightgear.git Fix for runway search glitch Suggested by K.Hoercher --- diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index 4018cc5bc..70679c21f 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -240,7 +240,7 @@ string FGRunwayList::search( const string& aptid, const int tgt_hdg ) { // SG_LOG( SG_GENERAL, SG_INFO, // "Runway " << tmp_r._rwy_no << " heading = " // << tmp_r._heading << " diff = " << diff ); - if ( diff < min_diff ) { + if ((diff < min_diff) && (tmp_r._type == "runway")) { min_diff = diff; r = tmp_r; found_dir = 0; @@ -255,7 +255,7 @@ string FGRunwayList::search( const string& aptid, const int tgt_hdg ) { // "Runway -" << tmp_r._rwy_no << " heading = " << // tmp_r._heading + 180.0 << // " diff = " << diff ); - if ( diff < min_diff ) { + if ((diff < min_diff) && (tmp_r._type == "runway")) { min_diff = diff; r = tmp_r; found_dir = 180.0;