]> git.mxchange.org Git - flightgear.git/commitdiff
Don't create a new instance of /fdm/jsbsim upon reset
authorehofman <ehofman>
Fri, 26 Jun 2009 11:58:44 +0000 (11:58 +0000)
committerTim Moore <timoore@redhat.com>
Thu, 2 Jul 2009 06:59:15 +0000 (08:59 +0200)
src/FDM/JSBSim/FGFDMExec.cpp

index a6b5a736708f8fe46f7ef9e07a901791f185c453..91aff117788a7a7124819a7e930641ef5a611aa4 100644 (file)
@@ -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);