Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-03 09:31:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-03 09:31:53 +0300
commitfe8d5b81b09462d2344a50b32bfd2d8df5c6d886 (patch)
tree6f1df9a8387a95c7fca3b28ecf168f1cb06214ea /source/blender/blenkernel/intern/pointcache.c
parentde8e066a1ca29fe58295ee6b12b735d023528681 (diff)
use c90 compatible static initializers.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c8
1 files changed, 6 insertions, 2 deletions
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);