]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewmgr.cxx
Multiplayer client/server system -- Fix building MPS enabled binary
[flightgear.git] / src / Main / viewmgr.cxx
index 90fd4c3a73c68e5c794e9f8a66d512f4388cecac..39e7ac95bd5a893e0498c02efa2ec4722c5f22c4 100644 (file)
@@ -56,6 +56,7 @@ FGViewMgr::init ()
   double heading_offset_deg, pitch_offset_deg, roll_offset_deg;
   double target_x_offset_m, target_y_offset_m, target_z_offset_m;
   double near_m;
+  bool internal;
 
   for (int i = 0; i < fgGetInt("/sim/number-views"); i++) {
     viewpath = "/sim/view";
@@ -67,6 +68,12 @@ FGViewMgr::init ()
     nodepath += "/type";
     strdata = fgGetString(nodepath.c_str());
 
+    // find out if this is an internal view (e.g. in cockpit, low near plane)
+    internal = false; // default
+    nodepath = viewpath;
+    nodepath += "/internal";
+    internal = fgGetBool(nodepath.c_str());
+
     // FIXME:
     // this is assumed to be an aircraft model...we will need to read
     // model-from-type as well.
@@ -155,13 +162,14 @@ FGViewMgr::init ()
                               heading_offset_deg, pitch_offset_deg,
                               roll_offset_deg, fov_deg,
                               target_x_offset_m, target_y_offset_m,
-                              target_z_offset_m, near_m ));
+                              target_z_offset_m, near_m, internal ));
     else
       add_view(new FGViewer ( FG_LOOKFROM, from_model, from_model_index,
                               false, 0, 0.0, 0.0, 0.0,
                               x_offset_m, y_offset_m, z_offset_m,
                               heading_offset_deg, pitch_offset_deg,
-                              roll_offset_deg, fov_deg, 0, 0, 0, near_m ));
+                              roll_offset_deg, fov_deg, 0, 0, 0, near_m,
+                              internal ));
   }
 
   copyToCurrent();