]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/groundcache.cxx
Developer-warnings
[flightgear.git] / src / FDM / groundcache.cxx
index 0e2d43b5b96c0b01a62cfd531104b36be1a73fc1..0b341159aadd04bae91e51e22971dc989d2fd461 100644 (file)
@@ -41,6 +41,7 @@
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/SGMisc.hxx>
+#include <simgear/scene/material/mat.hxx>
 #include <simgear/scene/util/SGNodeMasks.hxx>
 #include <simgear/scene/util/SGSceneUserData.hxx>
 #include <simgear/scene/util/OsgMath.hxx>
@@ -381,10 +382,9 @@ FGGroundCache::prepare_ground_cache(double startSimTime, double endSimTime,
     if (!found_ground) {
         // Ok, still nothing here?? Last resort ...
         double alt = 0;
-        const SGMaterial* m = NULL;
+        _material = 0;
         found_ground = globals->get_scenery()->
-            get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &m);
-        _material = m;
+            get_elevation_m(SGGeod::fromGeodM(geodPt, 10000), alt, &_material);
         if (found_ground)
             _altitude = alt;
     }
@@ -921,7 +921,7 @@ bool FGGroundCache::caught_wire(double t, const SGVec3d pt[4])
         _localBvhTree->accept(wireIntersector);
     
     _wire = wireIntersector.getWire();
-    return _wire;
+    return (_wire != NULL);
 }
 
 class FGGroundCache::WireFinder : public BVHVisitor {