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:
@@ -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 */
|
/* set frames cached before birth to birth time */
|
||||||
if(cfra < pa->time)
|
if(cfra < pa->time)
|
||||||
pa->state.time = pa->time;
|
pa->state.time = pa->time;
|
||||||
|
else if(cfra > pa->dietime)
|
||||||
|
pa->state.time = pa->dietime;
|
||||||
|
|
||||||
if(data[BPHYS_DATA_SIZE])
|
if(data[BPHYS_DATA_SIZE])
|
||||||
PTCACHE_DATA_TO(data, BPHYS_DATA_SIZE, 0, &pa->size);
|
PTCACHE_DATA_TO(data, BPHYS_DATA_SIZE, 0, &pa->size);
|
||||||
|
Reference in New Issue
Block a user