]> git.mxchange.org Git - flightgear.git/commitdiff
do also silence the marker sounds on --disable-sound
authormfranz <mfranz>
Thu, 12 May 2005 18:30:59 +0000 (18:30 +0000)
committermfranz <mfranz>
Thu, 12 May 2005 18:30:59 +0000 (18:30 +0000)
src/Instrumentation/marker_beacon.cxx
src/Instrumentation/marker_beacon.hxx

index 9f7201d9571715b65524c2ee517dc624c60b1b7f..018d5baf7e4c2d62247b5ed1cd9067b0d904d3a9 100644 (file)
@@ -98,6 +98,7 @@ FGMarkerBeacon::init ()
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), num, true );
     // Inputs
+    sound_pause = fgGetNode("/sim/sound/pause", false);
     lon_node = fgGetNode("/position/longitude-deg", true);
     lat_node = fgGetNode("/position/latitude-deg", true);
     alt_node = fgGetNode("/position/altitude-ft", true);
@@ -151,7 +152,8 @@ FGMarkerBeacon::update(double dt)
 {
     need_update = false;
 
-    if ( has_power() && serviceable->getBoolValue() ) {
+    if ( has_power() && serviceable->getBoolValue()
+            && !sound_pause->getBoolValue()) {
 
        // On timeout, scan again
        _time_before_search_sec -= dt;
index 5b4760d2d1cb3ddd12c45fbb93e8c02dadeae3a7..976e63d905689103905e04ed1391e44c96ea7748 100644 (file)
@@ -53,6 +53,7 @@ class FGMarkerBeacon : public SGSubsystem
     SGPropertyNode *power_btn;
     SGPropertyNode *audio_btn;
     SGPropertyNode *serviceable;
+    SGPropertyNode *sound_pause;
 
     bool need_update;