From d1dfc42dced73fadbf6ce503654e1b7a115e50c4 Mon Sep 17 00:00:00 2001 From: mfranz Date: Tue, 3 Jul 2007 15:41:03 +0000 Subject: [PATCH] remove the "terrain-elevation" command again. This is no longer necessary, as we have the geodinfo() Nasal function now. --- src/Main/fg_commands.cxx | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index c86c52ea2..cd637d77b 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -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(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 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 }, -- 2.39.5