From 109d04b6057ad3e2d54489e6ffcf78374564017d Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Fri, 5 Oct 2012 00:07:40 +0200 Subject: [PATCH] Fix ATIS output. Need to call inherited update to control volume and enable/disable depending on sound ATC switch. --- src/ATCDCL/ATC.cxx | 3 +++ src/ATCDCL/atis.cxx | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/ATCDCL/ATC.cxx b/src/ATCDCL/ATC.cxx index cf1e7c823..89cb55273 100644 --- a/src/ATCDCL/ATC.cxx +++ b/src/ATCDCL/ATC.cxx @@ -81,6 +81,9 @@ FGATC::~FGATC() { // call this from their own Update(...). void FGATC::update(double dt) { + // TODO This doesn't really do anything specific to this instance. + // All FGATCs share the same "_sgr" sound group. So this really should + // only be done once for all FGATCs. #ifdef ENABLE_AUDIO_SUPPORT bool active = _atc_external->getBoolValue() || _internal->getBoolValue(); diff --git a/src/ATCDCL/atis.cxx b/src/ATCDCL/atis.cxx index 14fd44e33..6b24db7b0 100644 --- a/src/ATCDCL/atis.cxx +++ b/src/ATCDCL/atis.cxx @@ -76,6 +76,8 @@ FGATIS::FGATIS(const std::string& name, int num) : trans_ident(""), old_volume(0), atis_failed(false), + msg_time(0), + cur_time(0), msg_OK(0), _attention(false), _prev_display(0), @@ -221,6 +223,8 @@ void FGATIS::update(double dt) { _prev_display = false; } _attention = false; + + FGATC::update(dt); } string uppercase(const string &s) { -- 2.39.5