Fix for [#27131] particle system BUG - one particle generated twice at vertex (e...
authorJanne Karhu <jhkarh@gmail.com>
Sun, 15 May 2011 15:51:17 +0000 (15:51 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Sun, 15 May 2011 15:51:17 +0000 (15:51 +0000)
* The tiny offset value used in particle distribution code was actually too small, so that floating point errors got the best of the calculations.

source/blender/blenkernel/intern/particle_system.c

index c2aa297b1749c2b86e4c024ea360a48e90ec759e..6b1540d7d53c35fb5a34126c1c71793c8fc2e985 100644 (file)
@@ -1250,7 +1250,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
                double step, pos;
                
                step= (totpart < 2) ? 0.5 : 1.0/(double)totpart;
-               pos= 1e-16; /* tiny offset to avoid zero weight face */
+               pos= 1e-6; /* tiny offset to avoid zero weight face */
                i= 0;
 
                for(p=0; p<totpart; p++, pos+=step) {