]> git.mxchange.org Git - flightgear.git/commitdiff
remove the "terrain-elevation" command again. This is no longer necessary,
authormfranz <mfranz>
Tue, 3 Jul 2007 15:41:03 +0000 (15:41 +0000)
committermfranz <mfranz>
Tue, 3 Jul 2007 15:41:03 +0000 (15:41 +0000)
as we have the geodinfo() Nasal function now.

src/Main/fg_commands.cxx

index c86c52ea23b39d7a5e43525abdb000ca8d227442..cd637d77bca8a3101bdb82d9261f8ea1d493a334 100644 (file)
@@ -1244,35 +1244,6 @@ do_replay (const SGPropertyNode * arg)
 }
 
 
-/**
- * Return terrain elevation for given longitude/latitude pair.
- */
-static bool
-do_terrain_elevation (const SGPropertyNode * arg)
-{
-    SGPropertyNode *a = const_cast<SGPropertyNode *>(arg);
-    const SGMaterial *mat;
-    double elev;
-
-    double lon = a->getDoubleValue("longitude-deg", 0.0);
-    double lat = a->getDoubleValue("latitude-deg", 0.0);
-    bool ret = globals->get_scenery()->get_elevation_m(lat, lon, 10000.0, elev, &mat);
-
-    bool solid = true;
-    const char *matname = "";
-    if (mat) {
-        solid = mat->get_solid();
-        const vector<string> names = mat->get_names();
-        if (!names.empty())
-            matname = names[0].c_str();
-    }
-    a->setBoolValue("solid", solid);
-    a->setStringValue("material", matname);
-    a->setDoubleValue("elevation-m", elev);
-    return ret;
-}
-
-
 static bool
 do_decrease_visibility (const SGPropertyNode * arg)
 {
@@ -1491,7 +1462,6 @@ static struct {
     { "presets-commit", do_presets_commit },
     { "log-level", do_log_level },
     { "replay", do_replay },
-    { "terrain-elevation", do_terrain_elevation },
     { "decrease-visibility", do_decrease_visibility },
     { "increase-visibility", do_increase_visibility },
     { "hud-init", do_hud_init },