]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/commlist.cxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / ATC / commlist.cxx
index 36c5f88b53130ffecdaffe0da7cf4536bdc2903c..fe52e03afabc510d0ae421dc88f65e41f150d046 100644 (file)
@@ -61,6 +61,9 @@ bool FGCommList::init( SGPath path ) {
        temp.append( "ATC/default.tower" );
        LoadComms(temp);
        temp = path;
+       temp.append( "ATC/default.ground" );
+       LoadComms(temp);
+       temp = path;
        temp.append( "ATC/default.approach" );
        LoadComms(temp);
        return true;
@@ -94,12 +97,13 @@ bool FGCommList::LoadComms(SGPath path) {
                        commlist_freq[a.freq].push_back(a);
                        
                        // Push non-atis stations onto bucket map as well
-                       if(a.type != ATIS) {
+                       // In fact, push all stations onto bucket map for now so FGATCMgr::GetFrequency() works.
+                       //if(a.type != ATIS) {
                                // get bucket number
                                SGBucket bucket(a.lon, a.lat);
                                int bucknum = bucket.gen_index();
                                commlist_bck[bucknum].push_back(a);
-                       }
+                       //}
                }
                
                fin >> skipcomment;
@@ -270,6 +274,7 @@ bool FGCommList::FindByCode( string ICAO, ATCData& ad, atc_type tp ) {
                                        ad = *itr;
                                        return true;
                                }
+                               ++itr;
                        }
                }
     } else {