diff options
author | Kent Mein <mein@cs.umn.edu> | 2003-03-23 19:01:32 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2003-03-23 19:01:32 +0300 |
commit | e2d9d5de08d03974ad8e3cb3b4bf3a167efdce7b (patch) | |
tree | d57ea913fe062bf6bb5e5947c95c03ed0c214fa0 /source/blender | |
parent | dc91e981593492217922e0a23863aae8e99a86c5 (diff) |
Didn't hear any complaints so I'm commiting the patch for bug:
http://projects.blender.org/tracker/index.php?func=detail&aid=76&group_id=9&atid
=125
Kent
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 71 |
1 files changed, 35 insertions, 36 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index 8956d92a540..279fa2debdd 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -363,42 +363,40 @@ void make_particle_keys(int depth, int nr, PartEff *paf, Particle *part, float * particle_tex(mtex, paf, pa->co, pa->no); } - /* keys */ - if(paf->totkey>1) { - - deltalife= pa->lifetime/(paf->totkey-1); + if(paf->totkey>1) deltalife= pa->lifetime/(paf->totkey-1); + else deltalife= pa->lifetime; + + opa= pa; + pa++; + + b= paf->totkey-1; + while(b--) { + /* nieuwe tijd */ + pa->time= opa->time+deltalife; + + /* nieuwe plek */ + pa->co[0]= opa->co[0] + deltalife*opa->no[0]; + pa->co[1]= opa->co[1] + deltalife*opa->no[1]; + pa->co[2]= opa->co[2] + deltalife*opa->no[2]; + + /* nieuwe snelheid */ + pa->no[0]= opa->no[0] + deltalife*force[0]; + pa->no[1]= opa->no[1] + deltalife*force[1]; + pa->no[2]= opa->no[2] + deltalife*force[2]; + + /* snelheid: texture */ + if(mtex && paf->texfac!=0.0) { + particle_tex(mtex, paf, pa->co, pa->no); + } + if(damp!=1.0) { + pa->no[0]*= damp; + pa->no[1]*= damp; + pa->no[2]*= damp; + } + opa= pa; pa++; - - b= paf->totkey-1; - while(b--) { - /* nieuwe tijd */ - pa->time= opa->time+deltalife; - - /* nieuwe plek */ - pa->co[0]= opa->co[0] + deltalife*opa->no[0]; - pa->co[1]= opa->co[1] + deltalife*opa->no[1]; - pa->co[2]= opa->co[2] + deltalife*opa->no[2]; - - /* nieuwe snelheid */ - pa->no[0]= opa->no[0] + deltalife*force[0]; - pa->no[1]= opa->no[1] + deltalife*force[1]; - pa->no[2]= opa->no[2] + deltalife*force[2]; - - /* snelheid: texture */ - if(mtex && paf->texfac!=0.0) { - particle_tex(mtex, paf, pa->co, pa->no); - } - if(damp!=1.0) { - pa->no[0]*= damp; - pa->no[1]*= damp; - pa->no[2]*= damp; - } - - opa= pa; - pa++; - /* opa wordt onderin ook gebruikt */ - } + /* opa wordt onderin ook gebruikt */ } if(deform) { @@ -411,10 +409,11 @@ void make_particle_keys(int depth, int nr, PartEff *paf, Particle *part, float * } } - /* de grote vermenigvuldiging */ + /* the big multiplication */ if(depth<PAF_MAXMULT && paf->mult[depth]!=0.0) { - /* uit gemiddeld 'mult' deel van de particles ontstaan 'child' nieuwe */ + /* new 'child' emerges from an average 'mult' part from + the particles */ damp = (float)nr; rt1= (int)(damp*paf->mult[depth]); rt2= (int)((damp+1.0)*paf->mult[depth]); |