//
// 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
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
+#include <Scripting/NasalSys.hxx>
#include "AIBase.hxx"
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;
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,
model = sgLoad3DModel(fg_root,
path,
prop_root,
- sim_time_sec);
+ sim_time_sec, 0,
+ new FGNasalModelData);
manager->setModel(path, model);
}