X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIBase.cxx;h=b1dca66e790f2fdda3d4037eef64b07eb7657c40;hb=479d4d7484f6aabd4f4e5bb5ece9c6499272ed51;hp=3aa8b0002ac0e6f51376fe25da5d3fb80dc15c2b;hpb=5fe860750eb8b99401a64b6aca68cc7b3da5eac9;p=flightgear.git diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index 3aa8b0002..b1dca66e7 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -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,