]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Animation/Muscle.cpp
Applied clang-format on all files
[lugaru.git] / Source / Animation / Muscle.cpp
index 4485c5e64153bcd2492d8c8cf745da9acec2855e..da43de4f02bb5258513ce1bb8f465eadd2d821f1 100644 (file)
@@ -26,21 +26,30 @@ extern float multiplier;
 extern bool freeze;
 
 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<Joint>& joints)
@@ -97,7 +106,6 @@ void Muscle::loadVerticesClothes(FILE* tfile, int vertexNum)
     }
 }
 
-
 /* EFFECT
  * sets strength, length,
  *      parent1->position, parent2->position,
@@ -133,7 +141,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;