]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBase.cxx
Mathias Fröhlich:
[flightgear.git] / src / AIModel / AIBase.cxx
index 3aa8b0002ac0e6f51376fe25da5d3fb80dc15c2b..b1dca66e790f2fdda3d4037eef64b07eb7657c40 100644 (file)
@@ -15,7 +15,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 
 #ifdef HAVE_CONFIG_H
@@ -76,7 +76,7 @@ FGAIBase::~FGAIBase() {
     if (props) {
       SGPropertyNode* parent = props->getParent();
       if (parent)
-        parent->removeChild(props->getName(), props->getIndex());
+        parent->removeChild(props->getName(), props->getIndex(), false);
     }
     delete fp;
     fp = 0;
@@ -121,12 +121,6 @@ void FGAIBase::Transform() {
 
 bool FGAIBase::init() {
 
-   SGPropertyNode *root = globals->get_props()->getNode("ai/models", true);
-
-   unsigned index = root->getChildren(getTypeString()).size();
-
-   props = root->getNode(getTypeString(), index, true);
-
    if (!model_path.empty()) {
      try {
        model = load3DModel( globals->get_fg_root(), model_path, props,