]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix animation breakage, and use a separate value similar to self.skeletonindex. I...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 Jan 2012 14:34:10 +0000 (16:34 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 Jan 2012 14:34:10 +0000 (16:34 +0200)
qcsrc/common/util.qc
qcsrc/common/util.qh

index 5c9eaf0e1fed43de6f04f96806af6d8e9e2f101c..0d07c91407109ef1fed78dc942f81298aafeff66 100644 (file)
@@ -2220,11 +2220,11 @@ float Update_Skeleton(entity e)
        // updates the skeleton if needed, and returns the total number of bones
        if(e.skeletonmodelindex != e.modelindex)
        {
-               if(e.skeletonindex)
-                       skel_delete(e.skeletonindex);
-               e.skeletonindex = skel_create(e.modelindex);
+               if(e.qc_skeletonindex)
+                       skel_delete(e.qc_skeletonindex);
+               e.qc_skeletonindex = skel_create(e.modelindex);
                e.skeletonmodelindex = e.modelindex;
        }
-       return skel_get_numbones(e.skeletonindex);
+       return skel_get_numbones(e.qc_skeletonindex);
 }
 #endif
index d8400a3dc52d662a8e0e600d1eb996ade5b3ac52..d940833e537bb69a14391bcd3b9d59f9709a8832 100644 (file)
@@ -292,6 +292,7 @@ float InterpretBoolean(string input);
 void Shutdown();
 
 #ifndef MENUQC
+.float qc_skeletonindex; // maintains a separate skeleton for checking, different than skeletonindex
 float Update_Skeleton(entity e);
 // loops through the tags of model v using counter tagnum
 #define FOR_EACH_TAG(v) float tagnum, tags; tags = Update_Skeleton(v); for(tagnum = 0; tagnum < tags; tagnum++, gettaginfo(v, tagnum))