diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2009-10-08 19:19:57 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2009-10-08 19:19:57 +0400 |
commit | e936c809851ee99736827ecb6935ffb2cc06da9b (patch) | |
tree | 20b28d9d1d712a088b60d3b3f81eb3bc4be65b08 /source/blender | |
parent | 248de36c63a51a600303aba74bbf7b188a90fd95 (diff) |
Smoke:
* Bugfix for non initialized arrays (reported by nudelZ)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/smoke.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index c1e79651c59..fbc052db6f3 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -964,8 +964,7 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) for(z = 0; z < sds->res[2]; z++) { EffectedPoint epoint; - float voxelCenter[3], vel[3], retvel[3]; - + float voxelCenter[3] = {0,0,0} , vel[3] = {0,0,0} , retvel[3] = {0,0,0}; unsigned int index = smoke_get_index(x, sds->res[0], y, sds->res[1], z); if(density[index] < FLT_EPSILON) @@ -983,9 +982,9 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd) pdDoEffectors(effectors, NULL, sds->effector_weights, &epoint, retvel, NULL); // TODO dg - do in force! - force_x[index] += MIN2(MAX2(-1.0, retvel[0] * 0.002), 1.0); - force_y[index] += MIN2(MAX2(-1.0, retvel[1] * 0.002), 1.0); - force_z[index] += MIN2(MAX2(-1.0, retvel[2] * 0.002), 1.0); + force_x[index] = MIN2(MAX2(-1.0, retvel[0] * 0.2), 1.0); + force_y[index] = MIN2(MAX2(-1.0, retvel[1] * 0.2), 1.0); + force_z[index] = MIN2(MAX2(-1.0, retvel[2] * 0.2), 1.0); } } |