]> git.mxchange.org Git - flightgear.git/blobdiff - src/AIModel/AIBallistic.cxx
Interim windows build fix
[flightgear.git] / src / AIModel / AIBallistic.cxx
index a8e5a16b795f47afe433e801466c9f89763bbc61..3a8eb46e4d646ec4dd48a88eb9133bb31a55cc00 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <Main/util.hxx>
 #include <Environment/gravity.hxx>
+#include <Main/fg_props.hxx>
 
 using namespace simgear;
 using std::string;
@@ -49,9 +50,9 @@ _azimuth(0.0),
 _elevation(0.0),
 _rotation(0.0),
 hs(0),
+_elapsed_time(0),
 _az_random_error(0.0),
 _el_random_error(0.0),
-_elapsed_time(0),
 _aero_stabilised(false),
 _drag_area(0.007),
 _cd(0.029),
@@ -319,7 +320,7 @@ void FGAIBallistic::setDragArea(double a) {
 
 void FGAIBallistic::setLife(double seconds) {
     if (_random)
-        life = seconds * (1 - _life_randomness + 2 * _life_randomness * sg_random());
+        life = seconds * _life_randomness + (seconds * (1 -_life_randomness) * sg_random());
     else
         life = seconds;
 }