From ffa9af11ed7433ca6b81479a89b08d20dc287dc9 Mon Sep 17 00:00:00 2001 From: Cyrille Henry Date: Mon, 25 Aug 2014 12:48:47 +0000 Subject: correct same init problem than with pmpd in closestMass svn path=/trunk/externals/pmpd/; revision=17341 --- pmpd3d_various.c | 1 + pmpd_various.c | 1 + 2 files changed, 2 insertions(+) diff --git a/pmpd3d_various.c b/pmpd3d_various.c index f4d420e..a3e823b 100644 --- a/pmpd3d_various.c +++ b/pmpd3d_various.c @@ -440,6 +440,7 @@ void pmpd3d_closestMass(t_pmpd3d *x, t_symbol *s, int argc, t_atom *argv) else { if ((x->nb_mass > 0)) { + x->grab_nb= 0; dist = sqr(x->mass[0].posX - posX) + sqr(x->mass[0].posY - posY) + sqr(x->mass[0].posZ - posZ); for (i=1; inb_mass; i++) { diff --git a/pmpd_various.c b/pmpd_various.c index f21bf51..9233800 100644 --- a/pmpd_various.c +++ b/pmpd_various.c @@ -166,6 +166,7 @@ void pmpd_closestMass(t_pmpd *x, t_symbol *s, int argc, t_atom *argv) else { if ((x->nb_mass > 0)) { + x->grab_nb= 0; dist = x->mass[0].posX - posX; for (i=1; inb_mass; i++) { -- cgit v1.2.1