X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FAIModel%2FAIBallistic.cxx;h=be5bcd74f3696c8aa6b4292bd281b99b43514815;hb=99ea9c9583d75cbf065e8a9d8f683c0daa913c95;hp=78ed4cdf0a479809ff6eddb3ac44ebf13ac78241;hpb=0ece93074f7e29bfe21ac47c66e678711ec2397d;p=flightgear.git diff --git a/src/AIModel/AIBallistic.cxx b/src/AIModel/AIBallistic.cxx index 78ed4cdf0..be5bcd74f 100644 --- a/src/AIModel/AIBallistic.cxx +++ b/src/AIModel/AIBallistic.cxx @@ -48,10 +48,10 @@ _ht_agl_ft(0.0), _azimuth(0.0), _elevation(0.0), _rotation(0.0), -_az_random_error(0.0), -_el_random_error(0.0), hs(0), _elapsed_time(0), +_az_random_error(0.0), +_el_random_error(0.0), _aero_stabilised(false), _drag_area(0.007), _cd(0.029), @@ -319,7 +319,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; }