From 293c91c305405799ce3ff72c60f7ea8347eb16b1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 17 Dec 2007 16:25:15 +0000 Subject: Bugfix: with a lot of child particles (1500 per parent), some faces would get no particles at all. Issue turns out to be precision of floats for incrementing a number between 0 and 1, now uses doubles.. --- source/blender/blenkernel/intern/particle_system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index f223e8d8681..49ce809ad6a 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1112,9 +1112,9 @@ int psys_threads_init_distribution(ParticleThread *threads, DerivedMesh *finaldm } } else { - float step, pos; + double step, pos; - step= (totpart <= 1)? 0.5f: 1.0f/(totpart-1); + step= (totpart <= 1)? 0.5: 1.0/(totpart-1); pos= 0.0f; i= 0; -- cgit v1.2.3