]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIEscort.cxx
Overhaul the ground-net / parking code.
[flightgear.git] / src / AIModel / AIEscort.cxx
index 765cac8dbd9e5d9cffded5605df6fbd7d4b69e11..8012ae9230ea2df4b5659bdfd0017ab1a62107fa 100644 (file)
@@ -190,8 +190,9 @@ bool FGAIEscort::getGroundElev(SGGeod inpos) {
 
     double height_m ;
 
-    const SGMaterial* material = 0;
-    if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(inpos, 3000), height_m, &material,0)){
+    const simgear::BVHMaterial* mat = 0;
+    if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(inpos, 3000), height_m, &mat, 0)){
+        const SGMaterial* material = dynamic_cast<const SGMaterial*>(mat);
         _ht_agl_ft = inpos.getElevationFt() - height_m * SG_METER_TO_FEET;
 
         if (material) {