]> git.mxchange.org Git - flightgear.git/commitdiff
Have update check that sound is enabled.
authordavid <david>
Thu, 3 Oct 2002 21:21:44 +0000 (21:21 +0000)
committerdavid <david>
Thu, 3 Oct 2002 21:21:44 +0000 (21:21 +0000)
src/Sound/fg_fx.cxx

index f8d05d4c2bf056edf6f20d3f995ec91e04829412..c7c7a17d7ce9a799953f9e59922c867fda425a83 100644 (file)
@@ -64,7 +64,7 @@ FGFX::init()
 
    path.append(path_str.c_str());
    SG_LOG(SG_GENERAL, SG_INFO, "Reading Instrument " << node->getName()
-         << " from " << path.str());
+          << " from " << path.str());
 
    SGPropertyNode root;
    try {
@@ -97,8 +97,10 @@ FGFX::unbind ()
 void
 FGFX::update (double dt)
 {
-   for (unsigned int i = 0; i < _sound.size(); i++ )
-      _sound[i]->update(dt);
+    if (fgGetBool("/sim/sound/audible")) {
+        for (unsigned int i = 0; i < _sound.size(); i++ )
+            _sound[i]->update(dt);
+    }
 }
 
 // end of fg_fx.cxx