From 9df5e8ee33a91a63f66dcd3847918af0649ebfc9 Mon Sep 17 00:00:00 2001 From: adrian Date: Sun, 4 Sep 2011 14:20:41 +0300 Subject: [PATCH] check for allowTransmission --- src/ATC/trafficcontrol.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index 15520295a..f49026f48 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -734,7 +734,9 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent, if ((onBoardRadioFreqI0 == stationFreq) || (onBoardRadioFreqI1 == stationFreq)) { - double snr = calculate_attenuation(rec, parent, ground_to_air); + + if (rec->allowTransmissions()) { + double snr = calculate_attenuation(rec, parent, ground_to_air); if (snr <= 0) return; if (snr > 0 && snr < 12) { @@ -749,8 +751,6 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent, } } - - if (rec->allowTransmissions()) { fgSetString("/sim/messages/atc", text.c_str()); } }