diff options
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index a62ca530bf9..a6cff9f20fb 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -3802,14 +3802,15 @@ static int dynamicPaint_paintParticles(DynamicPaintSurface *surface, */ KDTreeNearest *nearest; - int n, particles = 0; + int n, particles; float smooth_range = smooth * (1.0f - strength), dist; /* calculate max range that can have particles with higher influence than the nearest one */ float max_range = smooth - strength * smooth + solidradius; /* Make gcc happy! */ dist = max_range; - particles = BLI_kdtree_range_search(tree, max_range, bData->realCoord[bData->s_pos[index]].v, NULL, &nearest); + particles = BLI_kdtree_range_search(tree, bData->realCoord[bData->s_pos[index]].v, NULL, + &nearest, max_range); /* Find particle that produces highest influence */ for (n = 0; n < particles; n++) { |