]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a different way to get the total number of bones. Fixes the console spam issue...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 Jan 2012 11:32:15 +0000 (13:32 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 14 Jan 2012 11:32:15 +0000 (13:32 +0200)
qcsrc/common/util.qh

index ea41788231d389cf0c0c4c28aadb7147ae330e5f..772be86e025f04ab55a949b2b37786cb975a37e3 100644 (file)
@@ -293,7 +293,7 @@ void Shutdown();
 
 #ifndef MENUQC
 // loops through the tags of model v using counter tagnum
-#define FOR_EACH_TAG(v) float tagnum; for(tagnum = 0;; tagnum++, gettaginfo(v, tagnum)) if(tagnum && !gettaginfo_name) break; else
+#define FOR_EACH_TAG(v) float tagnum, totalbones; totalbones = skel_get_numbones(skel_create(v.modelindex)); skel_delete(v.modelindex); for(tagnum = 0, gettaginfo(v, tagnum); tagnum < totalbones; tagnum++, gettaginfo(v, tagnum))
 #endif
 #ifdef SVQC
 void WriteApproxPastTime(float dst, float t);