]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/model.cxx
Make sure that all elapsed time gets passed to update when a subsystem
[flightgear.git] / src / Model / model.cxx
index fd1ea0095558d402a4c27d7e0e9f2c744e6bed0c..00773806e5d0ff90359812115550497734126954 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <plib/sg.h>
 #include <plib/ssg.h>
+#include <plib/ul.h>
 
 #include <simgear/compiler.h>
 #include <simgear/debug/logstream.hxx>
@@ -253,7 +254,7 @@ fgLoad3DModel (const string &path)
                                 // Load the 3D aircraft object itself
   SGPath xmlpath;
   SGPath modelpath = path;
-  if ( path[ 0 ] == '/' || path[ 0 ] == '\\' || ( isalpha( path[ 0 ] ) && path[ 1 ] == ':' ) ) {
+  if ( ulIsAbsolutePathName( path.c_str() ) ) {
     xmlpath = modelpath;
   }
   else {
@@ -283,8 +284,8 @@ fgLoad3DModel (const string &path)
   }
 
                                 // Set up the alignment node
-  ssgTransform * align = new ssgTransform;
-  align->addKid(model);
+  ssgTransform * alignmainmodel = new ssgTransform;
+  alignmainmodel->addKid(model);
   sgMat4 res_matrix;
   make_offsets_matrix(&res_matrix,
                       props.getFloatValue("/offsets/heading-deg", 0.0),
@@ -293,7 +294,7 @@ fgLoad3DModel (const string &path)
                       props.getFloatValue("/offsets/x-m", 0.0),
                       props.getFloatValue("/offsets/y-m", 0.0),
                       props.getFloatValue("/offsets/z-m", 0.0));
-  align->setTransform(res_matrix);
+  alignmainmodel->setTransform(res_matrix);
 
                                 // Load panels
   unsigned int i;
@@ -335,7 +336,7 @@ fgLoad3DModel (const string &path)
     model->addKid(align);
   }
 
-  return model;
+  return alignmainmodel;
 }