]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/submodel.cxx
Vivian MEAZZA: fix subsubmodels
[flightgear.git] / src / AIModel / submodel.cxx
index c158c05f8f3fe875c79083457ee88a3f2831c5f8..9d9c1e94cb5c8ba604cc61e5244bc2e88886433b 100644 (file)
@@ -487,13 +487,12 @@ void FGSubmodelMgr::transform(submodel *sm)
             IC.azimuth += 360;
         else if (IC.azimuth >= 360)
             IC.azimuth -= 360;
-    }
-
-    // cout << "azimuth2 " << IC.azimuth<<endl;
+        // cout << "azimuth2 " << IC.azimuth<<endl;
 
-    IC.elevation = -atan(IC.total_speed_down / sqrt(IC.total_speed_north
+        IC.elevation = -atan(IC.total_speed_down / sqrt(IC.total_speed_north
             * IC.total_speed_north + IC.total_speed_east * IC.total_speed_east))
             * SG_RADIANS_TO_DEGREES;
+    }
 }
 
 void FGSubmodelMgr::updatelat(double lat)
@@ -517,7 +516,7 @@ void FGSubmodelMgr::loadAI()
     sm_list_iterator end = sm_list.end();
 
     while (sm_list_itr != end) {
-        string path = (*sm_list_itr)->_getPath();
+        string path = (*sm_list_itr)->_getSMPath();
 
         if (path.empty()) {
             ++sm_list_itr;