diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-12-02 20:01:06 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-12-02 20:01:06 +0400 |
commit | 818a345be3fd8378df7ec85501f0401bd0728845 (patch) | |
tree | 9d27d033920f87ae1eba10f8ec2c67052a5f62c4 /source/blender/blenkernel/intern/particle_system.c | |
parent | 432193552c43b9ab4546b72064390a373a3293e1 (diff) |
Silent a bunch of gcc warnings (usually dummy, but noisy!).
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index a780a9e8684..90889d7c09e 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2140,16 +2140,22 @@ static void psys_update_effectors(ParticleSimulationData *sim) precalc_guides(sim, sim->psys->effectors); } -static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration, void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse), void *forcedata) +static void integrate_particle(ParticleSettings *part, ParticleData *pa, float dtime, float *external_acceleration, + void (*force_func)(void *forcedata, ParticleKey *state, float *force, float *impulse), + void *forcedata) { +#define ZERO_F43 {{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}} + ParticleKey states[5]; - float force[3],acceleration[3],impulse[3],dx[4][3],dv[4][3],oldpos[3]; + float force[3], acceleration[3], impulse[3], dx[4][3] = ZERO_F43, dv[4][3] = ZERO_F43, oldpos[3]; float pa_mass= (part->flag & PART_SIZEMASS ? part->mass * pa->size : part->mass); int i, steps=1; int integrator = part->integrator; +#undef ZERO_F43 + copy_v3_v3(oldpos, pa->state.co); - + /* Verlet integration behaves strangely with moving emitters, so do first step with euler. */ if (pa->prev_state.time < 0.f && integrator == PART_INT_VERLET) integrator = PART_INT_EULER; |