diff options
author | N.N. <nimon@users.sourceforge.net> | 2010-09-07 16:07:33 +0000 |
---|---|---|
committer | N.N. <nimon@users.sourceforge.net> | 2010-09-07 16:07:33 +0000 |
commit | 6cb09178caa3fdd8876432998b0a62a04ffd4872 (patch) | |
tree | a5a7c5ccb618c493997416a10b43fc04e91693b7 /msd.h | |
parent | a2ca64e0894f1e748ee60559c31ce8205e93994e (diff) |
svn path=/trunk/externals/nusmuk/; revision=13979
Diffstat (limited to 'msd.h')
-rw-r--r-- | msd.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -127,7 +127,7 @@ public: inline bool getMobile() const { return invM != 0; } - inline void setMobile() { invM = M?1.f/M:1.; } + inline void setMobile() { invM = M?1/M:0.; } inline void setFixed() { invM = 0; } inline void compute(t_float limit[N][2]) @@ -1265,13 +1265,17 @@ protected: if(IsSymbol(argv[0])) { typename IDMap<t_mass *>::iterator it; //typename IDMap<t_link *>::iterator it; - for(it = massids.find(GetSymbol(argv[0])); it; ++it) + for(it = massids.find(GetSymbol(argv[0])); it; ++it) { it.data()->M = ma; + it.data()->invM = ma?1/ma:0.; + } } else { t_mass *m = mass.find(GetAInt(argv[0])); - if(m) + if(m) { m->M = ma; + m->invM = ma?1/ma:0.; + } else error("%s - %s : Index not found",thisName(),GetString(thisTag())); } |