Fix [#36791]: Fire ignores force fields when smoke is set to 0.0
authorMiika Hamalainen <blender@miikah.org>
Sun, 22 Sep 2013 16:09:31 +0000 (16:09 +0000)
committerMiika Hamalainen <blender@miikah.org>
Sun, 22 Sep 2013 16:09:31 +0000 (16:09 +0000)
source/blender/blenkernel/intern/smoke.c

index 189c1e967dd5b7db5e242aa1bf1742dc289596ed..2e2fb1e18f826d095a80bb4d8930ebf3cda02750 100644 (file)
@@ -2386,6 +2386,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
        if (effectors)
        {
                float *density = smoke_get_density(sds->fluid);
+               float *fuel = smoke_get_fuel(sds->fluid);
                float *force_x = smoke_get_force_x(sds->fluid);
                float *force_y = smoke_get_force_y(sds->fluid);
                float *force_z = smoke_get_force_z(sds->fluid);
@@ -2408,7 +2409,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
                                        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) || obstacle[index])
+                                       if ((MAX2(density[index], fuel[index]) < FLT_EPSILON) || obstacle[index])
                                                continue;
 
                                        vel[0] = velocity_x[index];