]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/environment_mgr.cxx
Encapsulate the interpolstion version of FGEnvironment and fix some bugs
[flightgear.git] / src / Environment / environment_mgr.cxx
index 08984463a015017c2f6f041a4b7321459836823a..172c41f1c110e905baa6c236a3a6c0944921b33d 100644 (file)
 
 
 FGEnvironmentMgr::FGEnvironmentMgr ()
-  : _environment(new FGEnvironment),
-    _controller(new FGInterpolateEnvironmentCtrl)
+  : _environment(new FGEnvironment)
 {
+
+   if (fgGetBool("/environment/params/real-world-weather-fetch") == true)
+       _controller = new FGMetarEnvironmentCtrl;
+   else
+       _controller = new FGInterpolateEnvironmentCtrl;
+
   _controller->setEnvironment(_environment);
   set_subsystem("controller", _controller, 0.5);
 }