]> git.mxchange.org Git - flightgear.git/commitdiff
set wind vector for particle systems
authortimoore <timoore>
Thu, 11 Sep 2008 10:29:18 +0000 (10:29 +0000)
committertimoore <timoore>
Thu, 11 Sep 2008 10:29:18 +0000 (10:29 +0000)
src/Environment/environment_mgr.cxx

index 8806b674e10f04c4b2cc250a6e0d580c548f7faa..b24d8acb490a173e0044bcd5d943b756b3314cc3 100644 (file)
 #  include <config.h>
 #endif
 
+#include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/scene/sky/sky.hxx>
 #include <simgear/environment/visual_enviro.hxx>
+#include <simgear/scene/model/particles.hxx>
 
 #include <Main/main.hxx>
 #include <Main/fg_props.hxx>
@@ -264,6 +266,10 @@ FGEnvironmentMgr::update (double dt)
                                   _environment->get_wind_from_east_fps(),
                                   _environment->get_wind_from_down_fps());
   _environment->set_elevation_ft(fgGetDouble("/position/altitude-ft"));
+  osg::Vec3 windVec(-_environment->get_wind_from_north_fps(),
+                    -_environment->get_wind_from_east_fps(),
+                    _environment->get_wind_from_down_fps());
+  simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER);
 
   _update_fdm();
 }