]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Skeleton.cpp
Removed unused globals
[lugaru.git] / Source / Skeleton.cpp
index 562ec8ed5e71d05a97e2dfa9f0422d96707d7a3e..1abc95930804838e2d0a5378053b0fcf0e5297aa 100644 (file)
@@ -1,5 +1,6 @@
 /*
 Copyright (C) 2003, 2010 - Wolfire Games
+Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
 
 This file is part of Lugaru.
 
@@ -25,7 +26,6 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 
 extern float multiplier;
 extern float gravity;
-extern Skeleton testskeleton;
 extern Terrain terrain;
 extern Objects objects;
 extern int environment;
@@ -682,7 +682,7 @@ void Animation::Load(const char *filename, int aheight, int aattack)
 {
     FILE *tfile;
     int i, j;
-    XYZ startoffset, endoffset;
+    XYZ endoffset;
 
     // path to dir
     const char *anim_prefix = ":Data:Animations:";
@@ -781,18 +781,14 @@ void Animation::Load(const char *filename, int aheight, int aattack)
         fclose(tfile);
     }
 
-    startoffset = 0;
     endoffset = 0;
-    // find average position of certain joints on first and last frames
-    // and save in startoffset, endoffset
+    // find average position of certain joints on last frames
+    // and save in endoffset
     // (not sure what exactly this accomplishes. the y < 1 test confuses me.)
     for (j = 0; j < joints; j++) {
-        if (position[j][0].y < 1)
-            startoffset += position[j][0];
         if (position[j][numframes - 1].y < 1)
             endoffset += position[j][numframes - 1];
     }
-    startoffset /= joints;
     endoffset /= joints;
     offset = endoffset;
     offset.y = 0;