From fe8d5b81b09462d2344a50b32bfd2d8df5c6d886 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 3 Nov 2010 06:31:53 +0000 Subject: use c90 compatible static initializers. --- source/blender/blenkernel/intern/pointcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/pointcache.c') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index bd37abc266b..002e8c9de0f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -199,13 +199,17 @@ static int ptcache_write_particle(int index, void *psys_v, void **data, int cfra ParticleSystem *psys= psys_v; ParticleData *pa = psys->particles + index; BoidParticle *boid = (psys->part->phystype == PART_PHYS_BOIDS) ? pa->boid : NULL; - float times[3] = {pa->time, pa->dietime, pa->lifetime}; + float times[3]; int step = psys->pointcache->step; /* No need to store unborn or died particles outside cache step bounds */ if(data[BPHYS_DATA_INDEX] && (cfra < pa->time - step || cfra > pa->dietime + step)) return 0; - + + times[0]= pa->time; + times[1]= pa->dietime; + times[2]= pa->lifetime; + PTCACHE_DATA_FROM(data, BPHYS_DATA_INDEX, &index); PTCACHE_DATA_FROM(data, BPHYS_DATA_LOCATION, pa->state.co); PTCACHE_DATA_FROM(data, BPHYS_DATA_VELOCITY, pa->state.vel); -- cgit v1.2.3