]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/marker_beacon.cxx
gps warning fix (xxx will be initialized after yyy)
[flightgear.git] / src / Instrumentation / marker_beacon.cxx
index ccb8499e109631b5bb52790f76557d076bb9ae4a..c9f7c9a34b54855a40204d432efe6af211a278b5 100644 (file)
@@ -100,7 +100,7 @@ FGMarkerBeacon::init ()
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), num, true );
     // Inputs
-    sound_pause = fgGetNode("/sim/sound/pause", false);
+    sound_working = fgGetNode("/sim/sound/working", true);
     lon_node = fgGetNode("/position/longitude-deg", true);
     lat_node = fgGetNode("/position/latitude-deg", true);
     alt_node = fgGetNode("/position/altitude-ft", true);
@@ -117,8 +117,9 @@ FGMarkerBeacon::init ()
     if (serviceable->getType() == simgear::props::NONE)
         serviceable->setBoolValue( true );
 
-    SGSoundMgr *smgr = (SGSoundMgr *)globals->get_subsystem("soundmgr");
+    SGSoundMgr *smgr = globals->get_soundmgr();
     _sgr = smgr->find("avionics", true);
+    _sgr->tie_to_listener();
 
     morse.init();
     beacon.init();
@@ -175,7 +176,7 @@ FGMarkerBeacon::update(double dt)
     }
 
     if ( has_power() && serviceable->getBoolValue()
-            && !sound_pause->getBoolValue()) {
+            && sound_working->getBoolValue()) {
 
         // marker beacon blinking
         bool light_on = ( outer_blink || middle_blink || inner_blink );