From 5a70edc4afd2f878b1d62168a2dd86edfe66a5fb Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Wed, 23 Feb 2011 10:42:27 +0000 Subject: Possible fix for [#26190] Changing particle amount crashes * In some cases fluid particles could be born at the exact same locations. Now these cases are just ignored and such particles don't effect each other. --- source/blender/blenkernel/intern/particle_system.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index c1a6558aea3..fd792168c6b 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2286,6 +2286,10 @@ static void particle_fluidsim(ParticleSystem *psys, int own_psys, ParticleData * /* pressure and near pressure */ for(n=own_psys?1:0; nprev_state.co); mul_v3_fl(ptn[n].co, 1.f/ptn[n].dist); q = ptn[n].dist/h; @@ -2305,6 +2309,10 @@ static void particle_fluidsim(ParticleSystem *psys, int own_psys, ParticleData * /* main calculations */ for(n=own_psys?1:0; nparticles + ptn[n].index; rij = ptn[n].dist; -- cgit v1.2.3