Fix for [#24401] Fluid particles leak through walls of moving object
authorJanne Karhu <jhkarh@gmail.com>
Wed, 27 Oct 2010 14:56:53 +0000 (14:56 +0000)
committerJanne Karhu <jhkarh@gmail.com>
Wed, 27 Oct 2010 14:56:53 +0000 (14:56 +0000)
source/blender/blenkernel/intern/particle_system.c

index be616d9922c034f0fc22e8ece96faef640bea613..a4c0776f5df127b09169aae5d8467d4e3def525d 100644 (file)
@@ -3076,8 +3076,8 @@ static void deflect_particle(ParticleSimulationData *sim, int p, float dfra, flo
                                        col.t = df;
                                }
                                else {
-                                       /* final chance to prevent failure, so don't do anything fancy */
-                                       copy_v3_v3(pa->state.co, co);
+                                       /* final chance to prevent failure, so stick to the surface and hope for the best */
+                                       madd_v3_v3v3fl(pa->state.co, co, col.vel, dt2);
                                        copy_v3_v3(pa->state.vel, v0);
                                }
                        }