]> git.mxchange.org Git - flightgear.git/commitdiff
Display AI plane transmissions if comm2 is tuned to the same frequency
authordaveluff <daveluff>
Tue, 14 Oct 2003 11:09:10 +0000 (11:09 +0000)
committerdaveluff <daveluff>
Tue, 14 Oct 2003 11:09:10 +0000 (11:09 +0000)
src/ATC/AIPlane.cxx

index bfb83a0e926bda89f15f98f6adcacb09f4d9ba2b..a2ea436fb62e1b526e87424904382c914646dc15 100644 (file)
@@ -78,11 +78,11 @@ void FGAIPlane::Update(double dt) {
        // TODO - turn it off if user switches to another freq - keep track of where in message we are etc.
        if(_transmit) {
                double user_freq0 = fgGetDouble("/radios/comm[0]/frequencies/selected-mhz");
-               //comm1 is not used yet.
+               double user_freq1 = fgGetDouble("/radios/comm[1]/frequencies/selected-mhz");
                _counter = 0.0;
                _max_count = 5.0;               // FIXME - hardwired length of message - need to calculate it!
                
-               if(freq == user_freq0) {
+               if(freq == user_freq0 || freq == user_freq1) {
                        //cout << "Transmitting..." << endl;
                        // we are on the same frequency, so check distance to the user plane
                        if(1) {