X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2Fgroundcache.cxx;h=0b341159aadd04bae91e51e22971dc989d2fd461;hb=2314ccfe13e5e175763000e4c8ba86be79aa3a97;hp=fc4fdfacafac249b3494264b0ce85a78e290347e;hpb=7e97a4c6930e6388259bca3721a998c26027bfd3;p=flightgear.git diff --git a/src/FDM/groundcache.cxx b/src/FDM/groundcache.cxx index fc4fdfaca..0b341159a 100644 --- a/src/FDM/groundcache.cxx +++ b/src/FDM/groundcache.cxx @@ -382,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; } @@ -922,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 {