]> git.mxchange.org Git - flightgear.git/commitdiff
Avoid nuisance sound effects after sim-reset.
authorThorstenB <brehmt@gmail.com>
Sat, 19 Mar 2011 13:51:39 +0000 (14:51 +0100)
committerThorstenB <brehmt@gmail.com>
Sat, 19 Mar 2011 13:51:39 +0000 (14:51 +0100)
src/Model/acmodel.cxx
src/Model/acmodel.hxx
src/Sound/fg_fx.cxx

index 5c63963a98eaac3ff90cdac8f05068b138ebac13..3c9faaf23d44456970714636869dbd9b1acf3222 100644 (file)
@@ -1,4 +1,4 @@
-// model.cxx - manage a 3D aircraft model.
+// acmodel.cxx - manage a 3D aircraft model.
 // Written by David Megginson, started 2002.
 //
 // This file is in the Public Domain, and comes with no warranty.
@@ -84,6 +84,7 @@ void
 FGAircraftModel::reinit()
 {
   deinit();
+  _fx->reinit();
   init();
 }
 
index 7965658cd719b682815b36773dd3b290efe63eda..b774874d233c39119ee4097d8244a0bda04ba586 100644 (file)
@@ -1,4 +1,4 @@
-// model.hxx - manage a 3D aircraft model.
+// acmodel.hxx - manage a 3D aircraft model.
 // Written by David Megginson, started 2002.
 //
 // This file is in the Public Domain, and comes with no warranty.
index ab0ace0a94d059f693996f9e43599904babd21aa..f60f441145b078ce0ff1bfeca01db33947cad486 100644 (file)
@@ -109,6 +109,9 @@ FGFX::init()
 void
 FGFX::reinit()
 {
+    for ( unsigned int i = 0; i < _sound.size(); i++ ) {
+        delete _sound[i];
+    }
     _sound.clear();
     init();
 };