]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/Model.cpp
FGPUIDialog: fix reading from already free'd memory.
[flightgear.git] / src / FDM / YASim / Model.cpp
index e328c6c5a1aae99d01da5511982750f7402c3d5b..8f33bdbaf1dc80691386798697f07e9aed92350c 100644 (file)
@@ -1,3 +1,8 @@
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include "Atmosphere.hpp"
 #include "Thruster.hpp"
 #include "Math.hpp"
@@ -321,13 +326,9 @@ void Model::updateGround(State* s)
         // Ask for the ground plane in the global coordinate system
         double global_ground[4];
         float global_vel[3];
-        int type;
-        const SGMaterial* material;
-        _ground_cb->getGroundPlane(pt, global_ground, global_vel,
-                              &type,&material);
-        static int h=0;
-        g->setGlobalGround(global_ground, global_vel, pt[0], pt[1],
-            type,material);
+        const simgear::BVHMaterial* material;
+        _ground_cb->getGroundPlane(pt, global_ground, global_vel, &material);
+        g->setGlobalGround(global_ground, global_vel, pt[0], pt[1], material);
     }
 
     for(i=0; i<_hitches.size(); i++) {