aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2014-08-25 12:48:47 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2014-08-25 12:48:47 +0000
commitffa9af11ed7433ca6b81479a89b08d20dc287dc9 (patch)
tree2a5414fb1aedf11d419347f292954a6ac0136ecf
parentd95fc3a7109f68cf672f9849c9042fcc357dad45 (diff)
correct same init problem than with pmpd in closestMass
svn path=/trunk/externals/pmpd/; revision=17341
-rw-r--r--pmpd3d_various.c1
-rw-r--r--pmpd_various.c1
2 files changed, 2 insertions, 0 deletions
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; i<x->nb_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; i<x->nb_mass; i++)
{