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..
This commit is contained in:
Brecht Van Lommel 2007-12-17 16:25:15 +00:00
parent d4ee29f70a
commit 293c91c305

@ -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;