Bug fix: with bigger than 1 cache step dead particles didn't alway stay dead

* Particle die time wasn't properly taken into account when reading from the cache.
This commit is contained in:
Janne Karhu
2011-02-18 15:21:52 +00:00
parent a0b88e1c49
commit 13f9715e1c

View File

@@ -280,6 +280,8 @@ static void ptcache_particle_read(int index, void *psys_v, void **data, float cf
/* set frames cached before birth to birth time */
if(cfra < pa->time)
pa->state.time = pa->time;
else if(cfra > pa->dietime)
pa->state.time = pa->dietime;
if(data[BPHYS_DATA_SIZE])
PTCACHE_DATA_TO(data, BPHYS_DATA_SIZE, 0, &pa->size);