From 1ed6276f16d4c5eeef0527830c1bd190af06bdcc Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 26 Jun 2009 11:58:44 +0000 Subject: [PATCH] Don't create a new instance of /fdm/jsbsim upon reset --- src/FDM/JSBSim/FGFDMExec.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/FDM/JSBSim/FGFDMExec.cpp b/src/FDM/JSBSim/FGFDMExec.cpp index a6b5a7367..91aff1177 100644 --- a/src/FDM/JSBSim/FGFDMExec.cpp +++ b/src/FDM/JSBSim/FGFDMExec.cpp @@ -132,7 +132,7 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root) : Root(root) Terminate = false; IdFDM = FDMctr; // The main (parent) JSBSim instance is always the "zeroth" - FDMctr++; // instance. "child" instances are loaded last. + // instance. "child" instances are loaded last. try { char* num = getenv("JSBSIM_DEBUG"); @@ -145,6 +145,9 @@ FGFDMExec::FGFDMExec(FGPropertyManager* root) : Root(root) if (master == 0) master = new FGPropertyManager; Root = master; + + // JSBSim Standalone, multiple childs are allowed + FDMctr++; } instance = Root->GetNode("/fdm/jsbsim",IdFDM,true);