Smoke:
authorDaniel Genrich <daniel.genrich@gmx.net>
Tue, 27 Jul 2010 16:18:12 +0000 (16:18 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Tue, 27 Jul 2010 16:18:12 +0000 (16:18 +0000)
- Bugfix for using uninitalised velocity in case of PART_PHYS_NO (reported by MiikaH)

source/blender/blenkernel/intern/smoke.c
source/blender/makesrna/intern/rna_modifier.c

index b106c55..2664a20 100644 (file)
@@ -937,12 +937,11 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
 
 
                                                                // Uses particle velocity as initial velocity for smoke
-                                                               if(sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY) {
-
+                                                               if(sfs->flags & MOD_SMOKE_FLOW_INITVELOCITY && (psys->part->phystype != PART_PHYS_NO))
+                                                               {
                                                                        velocity_x[index] = pa->state.vel[0]*sfs->vel_multi;
                                                                        velocity_y[index] = pa->state.vel[1]*sfs->vel_multi;
                                                                        velocity_z[index] = pa->state.vel[2]*sfs->vel_multi;
-
                                                                }                                                                               
                                                        
 
index dcf20a3..f4398b9 100644 (file)
@@ -252,7 +252,6 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
                                        part->sta = 1.0f;
                                        part->end = 250.0f;
                                        part->ren_as = PART_DRAW_NOT;
-                                       part->phystype = PART_PHYS_NO;
                                        sprintf(psys->name, "SmokeParticles");
                                        psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
                                        DAG_id_flush_update(ptr->id.data, OB_RECALC_DATA);