do also silence the marker sounds on --disable-sound
This commit is contained in:
parent
172dd40844
commit
11a1ca0651
2 changed files with 4 additions and 1 deletions
|
@ -98,6 +98,7 @@ FGMarkerBeacon::init ()
|
||||||
|
|
||||||
SGPropertyNode *node = fgGetNode(branch.c_str(), num, true );
|
SGPropertyNode *node = fgGetNode(branch.c_str(), num, true );
|
||||||
// Inputs
|
// Inputs
|
||||||
|
sound_pause = fgGetNode("/sim/sound/pause", false);
|
||||||
lon_node = fgGetNode("/position/longitude-deg", true);
|
lon_node = fgGetNode("/position/longitude-deg", true);
|
||||||
lat_node = fgGetNode("/position/latitude-deg", true);
|
lat_node = fgGetNode("/position/latitude-deg", true);
|
||||||
alt_node = fgGetNode("/position/altitude-ft", true);
|
alt_node = fgGetNode("/position/altitude-ft", true);
|
||||||
|
@ -151,7 +152,8 @@ FGMarkerBeacon::update(double dt)
|
||||||
{
|
{
|
||||||
need_update = false;
|
need_update = false;
|
||||||
|
|
||||||
if ( has_power() && serviceable->getBoolValue() ) {
|
if ( has_power() && serviceable->getBoolValue()
|
||||||
|
&& !sound_pause->getBoolValue()) {
|
||||||
|
|
||||||
// On timeout, scan again
|
// On timeout, scan again
|
||||||
_time_before_search_sec -= dt;
|
_time_before_search_sec -= dt;
|
||||||
|
|
|
@ -53,6 +53,7 @@ class FGMarkerBeacon : public SGSubsystem
|
||||||
SGPropertyNode *power_btn;
|
SGPropertyNode *power_btn;
|
||||||
SGPropertyNode *audio_btn;
|
SGPropertyNode *audio_btn;
|
||||||
SGPropertyNode *serviceable;
|
SGPropertyNode *serviceable;
|
||||||
|
SGPropertyNode *sound_pause;
|
||||||
|
|
||||||
bool need_update;
|
bool need_update;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue