From: Mircea Kitsune Date: Sat, 14 Jan 2012 11:46:11 +0000 (+0200) Subject: Separate total tags into a different definition, so it can be used anywhere X-Git-Tag: xonotic-v0.6.0~110^2^2~19 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cb07d350afd89cf1ba69d02cef945d45cd72c18e;p=xonotic%2Fxonotic-data.pk3dir.git Separate total tags into a different definition, so it can be used anywhere --- diff --git a/qcsrc/common/util.qh b/qcsrc/common/util.qh index 772be86e0..8e0868223 100644 --- a/qcsrc/common/util.qh +++ b/qcsrc/common/util.qh @@ -292,8 +292,10 @@ float InterpretBoolean(string input); void Shutdown(); #ifndef MENUQC +// gets the total number of tags on model v +#define TOTAL_TAGS(v) skel_get_numbones(skel_create(v.modelindex)); skel_delete(v.modelindex) // loops through the tags of model v using counter tagnum -#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)) +#define FOR_EACH_TAG(v) float tagnum, totaltags; totaltags = TOTAL_TAGS(v); for(tagnum = 0, gettaginfo(v, tagnum); tagnum < totaltags; tagnum++, gettaginfo(v, tagnum)) #endif #ifdef SVQC void WriteApproxPastTime(float dst, float t);