From 67bbb7c3b4b1bd06c150ddb31d2a264e8dd99281 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20Chilliet?= Date: Fri, 25 Nov 2016 21:42:57 +0800 Subject: [PATCH] Removed unused var --- Source/Skeleton.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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; -- 2.39.2