From 11a1ca06510d3b79a5b195feffca1f7cd0fdcd50 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 12 May 2005 18:30:59 +0000 Subject: [PATCH] do also silence the marker sounds on --disable-sound --- src/Instrumentation/marker_beacon.cxx | 4 +++- src/Instrumentation/marker_beacon.hxx | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Instrumentation/marker_beacon.cxx b/src/Instrumentation/marker_beacon.cxx index 9f7201d95..018d5baf7 100644 --- a/src/Instrumentation/marker_beacon.cxx +++ b/src/Instrumentation/marker_beacon.cxx @@ -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; diff --git a/src/Instrumentation/marker_beacon.hxx b/src/Instrumentation/marker_beacon.hxx index 5b4760d2d..976e63d90 100644 --- a/src/Instrumentation/marker_beacon.hxx +++ b/src/Instrumentation/marker_beacon.hxx @@ -53,6 +53,7 @@ class FGMarkerBeacon : public SGSubsystem SGPropertyNode *power_btn; SGPropertyNode *audio_btn; SGPropertyNode *serviceable; + SGPropertyNode *sound_pause; bool need_update; -- 2.39.5