From: Côme Chilliet Date: Fri, 25 Nov 2016 13:42:57 +0000 (+0800) Subject: Removed unused var X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=67bbb7c3b4b1bd06c150ddb31d2a264e8dd99281;p=lugaru.git Removed unused var --- diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index 0f06dd3..c7c9eb0 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -683,7 +683,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:"; @@ -782,18 +782,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;