Fixing tags.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@665 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-21 04:32:34 +00:00
parent 804a4f78eb
commit 47afae3dfe

View file

@ -2588,10 +2588,29 @@ void GLMod_GetTag(model_t *model, int tagnum, int frame, float **org, float **ax
tagnum--; //tagnum 0 is 'use my angles/org'
t += tagnum;
t += inf->numtags*frame;
*org = t->org;
*axis = (float*)t->ang;
}
int GLMod_TagNumForName(model_t *model, char *name)
{
int i;
galiasinfo_t *inf;
md3tag_t *t;
if (!model || model->type != mod_alias)
return 0;
inf = Mod_Extradata(model);
t = (md3tag_t*)((char*)inf + inf->ofstags);
for (i = 0; i < inf->numtags; i++)
{
if (!strcmp(t->name, name))
return i+1;
}
return 0;
}