]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/runwayprefs.cxx
Fix for refueling and radar calculations.
[flightgear.git] / src / Airports / runwayprefs.cxx
index 60e7f0710456fcbf78baf1e029b396e81e0ae3e5..90767d728a2407d5256b09b62a18ff323035efb8 100644 (file)
@@ -255,12 +255,12 @@ void RunwayGroup::setActive(const string &aptId,
                  //cerr << "Crosswnd : " << crossWind << endl;
                  if ((tailWind > maxTail) || (crossWind > maxCross))
                    {
-                     //cerr << "Invalid : ";
+                     //cerr << "Invalid : " << endl;
                      validSelection = false;
                   }
                  else 
                    {
-                     //cerr << "Valid   : ";
+                     //cerr << "Valid   : " << endl;;
                  }
                }else {
                SG_LOG( SG_GENERAL, SG_INFO, "Failed to find runway " << name << " at " << aptId );
@@ -269,18 +269,18 @@ void RunwayGroup::setActive(const string &aptId,
            }
          if (validSelection) 
            {
-             //cerr << "Valid   : ";
+             //cerr << "Valid selection  : " << i << endl;;
              foundValidSelection = true;
              for (stringVecIterator it = currentlyActive->begin(); 
                   it != currentlyActive->end(); it++)
                {
                  if ((*it) == name)
                    match++;
-                 if (match >= bestMatch) {
-                   bestMatch = match;
-                   bestChoice = i;
-                 }
                }
+             if (match >= bestMatch) {
+               bestMatch = match;
+               bestChoice = i;
+             }
            } 
          //cerr << "Preference " << i << " bestMatch " << bestMatch << " choice " << bestChoice << endl;
        }