1
0
Fork 0

check for allowTransmission

This commit is contained in:
adrian 2011-09-04 14:20:41 +03:00
parent 3a82ce7696
commit 9df5e8ee33

View file

@ -734,7 +734,9 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent,
if ((onBoardRadioFreqI0 == stationFreq) if ((onBoardRadioFreqI0 == stationFreq)
|| (onBoardRadioFreqI1 == 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) if (snr <= 0)
return; return;
if (snr > 0 && snr < 12) { 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()); fgSetString("/sim/messages/atc", text.c_str());
} }
} }