#include <GUI/dialog.hxx>
#include <Aircraft/replay.hxx>
#include <Scenery/tilemgr.hxx>
+#include <Scenery/scenery.hxx>
#if defined(HAVE_PLIB_PSL)
# include <Scripting/scriptmgr.hxx>
#endif
SG_LOG(SG_INPUT, SG_INFO, "Restored flight from " << file);
return true;
} else {
- SG_LOG(SG_INPUT, SG_ALERT, "Cannot load flight from " << file);
+ SG_LOG(SG_INPUT, SG_WARN, "Cannot load flight from " << file);
return false;
}
}
FGFX *fx = (FGFX *)globals->get_subsystem("fx");
string path = arg->getStringValue("path");
string file = arg->getStringValue("file");
+ double volume = arg->getDoubleValue("volume");
// cout << "playing " << path << " / " << file << endl;
- fx->play_message( path, file );
+ fx->play_message( path, file, volume );
return true;
}
}
+/**
+ * Return terrain elevation for given longitude/latitude pair.
+ */
+static bool
+do_terrain_elevation (const SGPropertyNode * arg)
+{
+ double lon = arg->getDoubleValue("longitude-deg", 0.0);
+ double lat = arg->getDoubleValue("latitude-deg", 0.0);
+ double elev;
+ bool ret = globals->get_scenery()->get_elevation_m(lat, lon, 10000.0, elev, 0, false);
+ const_cast<SGPropertyNode *>(arg)->setDoubleValue("elevation-m", elev);
+ return ret;
+}
+
static bool
do_decrease_visibility (const SGPropertyNode * arg)
{ "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 },