Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2009-04-04 16:48:40 +0400
committerJanne Karhu <jhkarh@gmail.com>2009-04-04 16:48:40 +0400
commitd84dc44835e817ee4b4324b1627cf5290cd9c8be (patch)
tree14cee39eced6288748e944eb201c9eacdf7d5fc0 /source
parentcb26c7e75acce743d8f9d906293dea4f582a8ba7 (diff)
Fix for [#18017] reactor particles affected by a curve guide emit at a wrong position.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 7bda29ebcaf..2728addeddd 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -1734,6 +1734,8 @@ void reset_particle(ParticleData *pa, ParticleSystem *psys, ParticleSystemModifi
VECSUB(p_vel,pa->r_ve,p_vel);
Normalize(p_vel);
VecMulf(p_vel,speed);
+
+ VECCOPY(pa->fuv,loc); /* abusing pa->fuv (not used for "from particle") for storing emit location */
}
else{
/* get precise emitter matrix if particle is born */
@@ -2483,7 +2485,12 @@ static void precalc_effectors(Object *ob, ParticleSystem *psys, ParticleSystemMo
ec->locations=MEM_callocN(totpart*3*sizeof(float),"particle locations");
for(p=0,pa=psys->particles; p<totpart; p++, pa++){
- psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,0,0,0,0,0);
+ if(part->from == PART_FROM_PARTICLE) {
+ VECCOPY(loc, pa->fuv);
+ }
+ else
+ psys_particle_on_emitter(psmd,part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,0,0,0,0,0);
+
Mat4MulVecfl(ob->obmat,loc);
ec->distances[p]=VecLenf(loc,vec);
VECSUB(loc,loc,vec);