From 5032e7fbd5eee78e081169f120b6d464f30f1bef Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Thu, 24 Oct 2019 02:34:40 +0200 Subject: [PATCH] [AFV] Ref T739, fix for tuned in/out sounds see https://discordapp.com/channels/539048679160676382/568904623151382546/636639367804485643 --- src/blackcore/context/contextownaircraftimpl.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/blackcore/context/contextownaircraftimpl.cpp b/src/blackcore/context/contextownaircraftimpl.cpp index 6213ea140..d0728a305 100644 --- a/src/blackcore/context/contextownaircraftimpl.cpp +++ b/src/blackcore/context/contextownaircraftimpl.cpp @@ -271,8 +271,8 @@ namespace BlackCore const bool atcCom1 = atcs.hasComUnitTunedInChannelSpacing(com1); const bool atcCom2 = atcs.hasComUnitTunedInChannelSpacing(com2); - const bool tunedIn1 = atcCom1 && !lastCom1.isReceiveEnabled(); - const bool tunedIn2 = atcCom2 && !lastCom2.isReceiveEnabled(); + const bool tunedIn1 = atcCom1 && !lastCom1.isReceiveEnabled(); + const bool tunedIn2 = atcCom2 && !lastCom2.isReceiveEnabled(); const bool tunedOut1 = !atcCom1 && lastCom1.isReceiveEnabled(); const bool tunedOut2 = !atcCom2 && lastCom2.isReceiveEnabled(); @@ -289,11 +289,11 @@ namespace BlackCore } // remember if I was tuned in, abusing the flag - lastCom1.setReceiveEnabled(tunedIn1); - lastCom2.setReceiveEnabled(tunedIn2); + com1.setReceiveEnabled(atcCom1); + com2.setReceiveEnabled(atcCom2); QWriteLocker l(&m_lockAircraft); - m_lastEvaluatedCom1 = lastCom1; - m_lastEvaluatedCom2 = lastCom2; + m_lastEvaluatedCom1 = com1; + m_lastEvaluatedCom2 = com1; } bool CContextOwnAircraft::updateOwnSituation(const CAircraftSituation &situation)