- Bugfix for using uninitalised velocity in case of PART_PHYS_NO (reported by MiikaH)
This commit is contained in:
Daniel Genrich 2010-07-27 16:18:12 +00:00
parent 88dcfbaee9
commit 112711e6a4
2 changed files with 2 additions and 4 deletions

@ -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;
}

@ -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);