Additional smoke fix for r54464: floating point precision still sometimes produced...
authorMiika Hamalainen <blender@miikah.org>
Mon, 11 Feb 2013 15:03:22 +0000 (15:03 +0000)
committerMiika Hamalainen <blender@miikah.org>
Mon, 11 Feb 2013 15:03:22 +0000 (15:03 +0000)
source/blender/blenkernel/intern/smoke.c

index d26339680c82472ad0d6c5f35d95ca767520f417..248cd689258ed86dc102d03a62b97ff1b08d8ddf 100644 (file)
@@ -1591,6 +1591,7 @@ BLI_INLINE void apply_inflow_fields(SmokeFlowSettings *sfs, float emission_value
                if (value > react[index]) {
                        float f = fuel_flow / fuel[index];
                        react[index] = value * f + (1.0f - f) * react[index];
+                       CLAMP(react[index], 0.0f, value);
                }
        }
 }