]> git.mxchange.org Git - flightgear.git/commitdiff
Added support for shared JSBSim engine and system configurations in fgdata.
authorAnders Gidenstam <anders@gidenstam.org>
Wed, 5 Mar 2014 21:28:53 +0000 (22:28 +0100)
committerAnders Gidenstam <anders@gidenstam.org>
Wed, 5 Mar 2014 21:41:34 +0000 (22:41 +0100)
Adds $FG_ROOT/Aircraft/Generic/JSBSim/{Engines,Systems} to the JSBSim
engines and system search paths. Internally JSBSim already searches
$aircraft_dir/Engines and $aircraft_dir/Systems.
A file in $aircraft_dir/{Engines,Systems} have higher priority than one
in the shared directories.

src/FDM/JSBSim/JSBSim.cxx

index 45b4b9e841f08004262844fc5a4b5c309d4ed2c8..03bc13dbeda1abf97e7b4eda2729b4621fd00229 100644 (file)
@@ -215,11 +215,11 @@ FGJSBsim::FGJSBsim( double dt )
 
     SGPath aircraft_path( fgGetString("/sim/aircraft-dir") );
 
-    SGPath engine_path( fgGetString("/sim/aircraft-dir") );
-    engine_path.append( "Engine" );
+    SGPath engine_path( fgGetString("/sim/fg-root") );
+    engine_path.append( "Aircraft/Generic/JSBSim/Engines" );
 
-    SGPath systems_path( fgGetString("/sim/aircraft-dir") );
-    systems_path.append( "Systems" );
+    SGPath systems_path( fgGetString("/sim/fg-root") );
+    systems_path.append( "Aircraft/Generic/JSBSim/Systems" );
 
 // deprecate sim-time-sec for simulation/sim-time-sec
 // remove alias with increased configuration file version number (2.1 or later)