X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAnimation%2FMuscle.cpp;h=6ccad1816c6574423fd9b5025924f097fefaee02;hb=d3f16728298e0639a3b2e916386f4e8cea4018ff;hp=c4f201a20e5505c4973267aaee0fb39e404e110d;hpb=b84825978803615f45a9f128232e62431042aec0;p=lugaru.git
diff --git a/Source/Animation/Muscle.cpp b/Source/Animation/Muscle.cpp
index c4f201a..6ccad18 100644
--- a/Source/Animation/Muscle.cpp
+++ b/Source/Animation/Muscle.cpp
@@ -18,28 +18,29 @@ You should have received a copy of the GNU General Public License
along with Lugaru. If not, see .
*/
-#include "Animation/Muscle.h"
+#include "Animation/Muscle.hpp"
+
#include "Utils/binio.h"
extern float multiplier;
extern bool freeze;
-Muscle::Muscle()
+Muscle::Muscle() :
+ length(0),
+ targetlength(0),
+ parent1(0),
+ parent2(0),
+ maxlength(0),
+ minlength(0),
+ type(boneconnect),
+ visible(false),
+ rotate1(0), rotate2(0), rotate3(0),
+ lastrotate1(0), lastrotate2(0), lastrotate3(0),
+ oldrotate1(0), oldrotate2(0), oldrotate3(0),
+ newrotate1(0), newrotate2(0), newrotate3(0),
+
+ strength(0)
{
- length = 0;
- targetlength = 0;
- parent1 = 0;
- parent2 = 0;
- maxlength = 0;
- minlength = 0;
- type = boneconnect;
- visible = 0;
- rotate1 = 0, rotate2 = 0, rotate3 = 0;
- lastrotate1 = 0, lastrotate2 = 0, lastrotate3 = 0;
- oldrotate1 = 0, oldrotate2 = 0, oldrotate3 = 0;
- newrotate1 = 0, newrotate2 = 0, newrotate3 = 0;
-
- strength = 0;
}
void Muscle::load(FILE* tfile, int vertexNum, std::vector& joints)
@@ -132,7 +133,7 @@ void Muscle::DoConstraint(bool spinny)
strength = 1;
length -= (length - relaxlength) * (1 - strength) * multiplier * 10000;
- length -= (length - targetlength) * (strength) * multiplier * 10000;
+ length -= (length - targetlength) * strength * multiplier * 10000;
if (strength == 0)
length = relaxlength;