Fix for [#25492] Cached particles are killed too early
authorJanne Karhu <jhkarh@gmail.com>
Wed, 5 Jan 2011 08:52:13 +0000 (08:52 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Wed, 5 Jan 2011 08:52:13 +0000 (08:52 +0000)
* Own mistake from the sph particle fluids fix.

source/blender/blenkernel/intern/particle_system.c

index f0af7e8684bfa7529822b268e5615c0d673e199a..f57364dfdef578038b4079a10aeac17694472e96 100644 (file)
@@ -2943,7 +2943,7 @@ static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, flo
                        /* particle dies in collision */
                        if(through == 0 && (part->flag & PART_DIE_ON_COL || pd->flag & PDEFLE_KILL_PART)) {
                                pa->alive = PARS_DYING;
-                               pa->dietime = pa->state.time + (cfra - pa->state.time) * f;
+                               pa->dietime = sim->psys->cfra + (cfra - sim->psys->cfra) * f;
 
                                copy_v3_v3(pa->state.co, co);
                                interp_v3_v3v3(pa->state.vel, pa->prev_state.vel, pa->state.vel, f);