]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/groundcache.cxx
make the state of the Meta and Super modifier keys available. These keys
[flightgear.git] / src / FDM / groundcache.cxx
index 2cedf7cc811da7f93abf4dfa5a60c1fe822ed19e..575cd8435343e113d3a58fdc8cd733ede906c982 100644 (file)
@@ -194,11 +194,6 @@ public:
 
     FGGroundCache::GroundProperty& gp = mGroundProperty;
     // get some material information for use in the gear model
-    gp.material = globals->get_matlib()->findMaterial(&node);
-    if (gp.material) {
-      gp.type = gp.material->get_solid() ? FGInterface::Solid : FGInterface::Water;
-      return true;
-    }
     gp.type = FGInterface::Unknown;
     osg::Referenced* base = node.getUserData();
     if (!base)
@@ -235,6 +230,12 @@ public:
     bool oldBackfaceCulling = mBackfaceCulling;
     updateCullMode(drawable->getStateSet());
 
+    FGGroundCache::GroundProperty& gp = mGroundProperty;
+    // get some material information for use in the gear model
+    gp.material = globals->get_matlib()->findMaterial(drawable->getStateSet());
+    if (gp.material)
+      gp.type = gp.material->get_solid() ? FGInterface::Solid : FGInterface::Water;
+
     drawable->accept(mTriangleFunctor);
 
     mBackfaceCulling = oldBackfaceCulling;
@@ -435,14 +436,15 @@ public:
   FGGroundCache::GroundProperty mGroundProperty;
 };
 
-FGGroundCache::FGGroundCache()
+FGGroundCache::FGGroundCache() :
+  ground_radius(0.0),
+  cache_ref_time(0.0),
+  wire_id(0),
+  reference_wgs84_point(SGVec3d(0, 0, 0)),
+  reference_vehicle_radius(0.0),
+  found_ground(false),
+  _material(0)
 {
-  ground_radius = 0.0;
-  cache_ref_time = 0.0;
-  wire_id = 0;
-  reference_wgs84_point = SGVec3d(0, 0, 0);
-  reference_vehicle_radius = 0.0;
-  found_ground = false;
 }
 
 FGGroundCache::~FGGroundCache()