]> git.mxchange.org Git - flightgear.git/commitdiff
Revert to old behavior of life randomness
authoronox <denkpadje@gmail.com>
Wed, 27 May 2015 09:35:51 +0000 (11:35 +0200)
committerErik Hofman <erik@ehofman.com>
Thu, 28 May 2015 08:43:06 +0000 (10:43 +0200)
Signed-off-by: onox <denkpadje@gmail.com>
src/AIModel/AIBallistic.cxx

index a8e5a16b795f47afe433e801466c9f89763bbc61..34d20364e9de1132965b4b1ea2e0aaa58dc293e2 100644 (file)
@@ -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;
 }