diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-03-29 14:27:31 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-03-29 14:27:31 +0400 |
commit | 7a252d982411c0bf7055d7295a01bdb24d8a80ef (patch) | |
tree | ae2238c466671714867f7a8baf5fbf5dfb248a2e /source | |
parent | dbd13d67b1aa03a08d02e686d0d2b542d38abb50 (diff) |
Fix for [#26658] Permeable colliders stop particles
* Forgot this exception from the collisions rewrite. Don't check collisions with the same face twice.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 9b1651b12cd..4dfc53e1734 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -157,8 +157,6 @@ typedef struct ParticleBillboardData typedef struct ParticleCollisionElement { - Object *ob; - /* pointers to original data */ float *x[4], *v[4]; @@ -171,6 +169,9 @@ typedef struct ParticleCollisionElement /* count of original data (1-4) */ int tot; + /* index of the collision face */ + int index; + /* flags for inversed normal / particle already inside element at start */ short inv_nor, inside; } ParticleCollisionElement; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 649a6fa90a0..2fe7f42abe3 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -2989,6 +2989,11 @@ void BKE_psys_collision_neartest_cb(void *userdata, int index, const BVHTreeRay pce.tot = 3; pce.inside = 0; + pce.index = index; + + /* don't collide with same face again */ + if(col->hit == col->current && col->pce.index == index && col->pce.tot == 3) + return; do { |