Fix for [#25492] Cached particles are killed too early

* Own mistake from the sph particle fluids fix.
This commit is contained in:
Janne Karhu
2011-01-05 08:52:13 +00:00
parent c8f0404f53
commit 7a7760e938

View 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);