]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Cleanup: don't unbind unknown properties
[flightgear.git] / src / Main / fg_commands.cxx
index e3b6be0c0f3817374ad1bdbd59a2f1816d82d893..a8c45e99962748cfddf5a22677f499b5641c13c7 100644 (file)
@@ -31,7 +31,6 @@
 #include <GUI/new_gui.hxx>
 #include <GUI/dialog.hxx>
 #include <Aircraft/replay.hxx>
-#include <Scenery/tilemgr.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scripting/NasalSys.hxx>
 #include <Sound/sample_queue.hxx>
@@ -518,6 +517,13 @@ do_dump_terrain_branch (const SGPropertyNode*)
     return true;
 }
 
+static bool
+do_print_visible_scene_info(const SGPropertyNode*)
+{
+    fgPrintVisibleSceneInfoCommand();
+    return true;
+}
+
 /**
  * Built-in command: hires capture screen.
  */
@@ -691,8 +697,6 @@ do_timeofday (const SGPropertyNode * arg)
         = fgGetNode("/position/longitude-deg");
     static const SGPropertyNode *latitude
         = fgGetNode("/position/latitude-deg");
-    static const SGPropertyNode *cur_time_override
-        = fgGetNode("/sim/time/cur-time-override", true);
 
     int orig_warp = globals->get_warp();
     SGTime *t = globals->get_time_params();
@@ -753,14 +757,10 @@ do_timeofday (const SGPropertyNode * arg)
                                              * SGD_DEGREES_TO_RADIANS,
                                            180.0, false ); 
     }
-    // cout << "warp = " << warp << endl;
-    globals->set_warp( orig_warp + warp );
-
-    t->update( longitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
-               latitude->getDoubleValue() * SGD_DEGREES_TO_RADIANS,
-               cur_time_override->getLongValue(),
-               globals->get_warp() );
+    
 
+    fgSetInt("/sim/time/warp", orig_warp + warp);
+    
     return true;
 }
 
@@ -1488,6 +1488,7 @@ static struct {
     { "release-cockpit-button", do_release_cockpit_button },
     { "dump-scenegraph", do_dump_scene_graph },
     { "dump-terrainbranch", do_dump_terrain_branch },
+    { "print-visible-scene", do_print_visible_scene_info },
     { "reload-shaders", do_reload_shaders },
     { 0, 0 }                   // zero-terminated
 };