]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewmgr.cxx
Merge branch 'topic/tape' into next
[flightgear.git] / src / Main / viewmgr.cxx
index 75785e1c3d4136883aedc590bb9b6dc683a9b1fc..17610d6b4fc7cd306368dd30d4eae8653aa9bda0 100644 (file)
@@ -147,11 +147,11 @@ FGViewMgr::reinit ()
     fgSetDouble("/sim/current-view/field-of-view", fov_deg);
 
     // target offsets for lookat mode only...
-    fgSetDouble("/sim/current-view/target-x-offset-deg",
+    fgSetDouble("/sim/current-view/target-x-offset-m",
         n->getDoubleValue("config/target-x-offset-m"));
-    fgSetDouble("/sim/current-view/target-y-offset-deg",
+    fgSetDouble("/sim/current-view/target-y-offset-m",
         n->getDoubleValue("config/target-y-offset-m"));
-    fgSetDouble("/sim/current-view/target-z-offset-deg",
+    fgSetDouble("/sim/current-view/target-z-offset-m",
         n->getDoubleValue("config/target-z-offset-m"));
   }
   setView(0);
@@ -212,9 +212,10 @@ FGViewMgr::bind ()
        &FGViewMgr::getNear_m, &FGViewMgr::setNear_m);
   fgSetArchivable("/sim/current-view/ground-level-nearplane-m");
 
-  fgTie("/sim/current-view/viewer-x-m", this, &FGViewMgr::getViewerPositionX_m);
-  fgTie("/sim/current-view/viewer-y-m", this, &FGViewMgr::getViewerPositionY_m);
-  fgTie("/sim/current-view/viewer-z-m", this, &FGViewMgr::getViewerPositionZ_m);
+  SGPropertyNode *n = fgGetNode("/sim/current-view", true);
+  n->tie("viewer-x-m", SGRawValuePointer<double>(&abs_viewer_position[0]));
+  n->tie("viewer-y-m", SGRawValuePointer<double>(&abs_viewer_position[1]));
+  n->tie("viewer-z-m", SGRawValuePointer<double>(&abs_viewer_position[2]));
 }
 
 void