]> git.mxchange.org Git - flightgear.git/commitdiff
Fix ATIS output.
authorThorstenB <brehmt@gmail.com>
Thu, 4 Oct 2012 22:07:40 +0000 (00:07 +0200)
committerThorstenB <brehmt@gmail.com>
Thu, 4 Oct 2012 22:07:40 +0000 (00:07 +0200)
Need to call inherited update to control volume and enable/disable
depending on sound ATC switch.

src/ATCDCL/ATC.cxx
src/ATCDCL/atis.cxx

index cf1e7c823692f0569bdce70f20bf712c95204a58..89cb5527302f99208a9ff03d7acecbe6674790ac 100644 (file)
@@ -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();
index 14fd44e3334ac27339d2ae466caffd10aee4c952..6b24db7b0b3adda664b66c369a1c6f02d625133b 100644 (file)
@@ -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) {