Fix for runway search glitch
Suggested by K.Hoercher <wbhoer@gmail.com>
This commit is contained in:
parent
ec8be8c67a
commit
428acda9e8
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue