Now works properly with larger multi-surface md5 models.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3243 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c021324009
commit
cfadc8e717
1 changed files with 8 additions and 6 deletions
|
@ -4480,6 +4480,7 @@ qboolean Mod_ParseMD5Anim(char *buffer, galiasinfo_t *prototype, void**poseofs,
|
||||||
float tx, ty, tz, qx, qy, qz;
|
float tx, ty, tz, qx, qy, qz;
|
||||||
int fac, flags;
|
int fac, flags;
|
||||||
float f;
|
float f;
|
||||||
|
char com_token[8192];
|
||||||
|
|
||||||
EXPECT("MD5Version");
|
EXPECT("MD5Version");
|
||||||
EXPECT("10");
|
EXPECT("10");
|
||||||
|
@ -4679,12 +4680,13 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
char *file;
|
char *file;
|
||||||
galiasinfo_t *root = NULL;
|
galiasinfo_t *root = NULL, *surf;
|
||||||
int numgroups = 0;
|
int numgroups = 0;
|
||||||
galiasgroup_t *grouplist = NULL;
|
galiasgroup_t *grouplist = NULL;
|
||||||
galiasgroup_t *newgroup = NULL;
|
galiasgroup_t *newgroup = NULL;
|
||||||
void **poseofs;
|
void **poseofs;
|
||||||
int hunkstart, hunkend, hunktotal;
|
int hunkstart, hunkend, hunktotal;
|
||||||
|
char com_token[8192];
|
||||||
|
|
||||||
|
|
||||||
loadmodel=mod;
|
loadmodel=mod;
|
||||||
|
@ -4828,13 +4830,13 @@ qboolean Mod_LoadCompositeAnim(model_t *mod, void *buffer)
|
||||||
|
|
||||||
newgroup = grouplist;
|
newgroup = grouplist;
|
||||||
grouplist = Hunk_Alloc(sizeof(galiasgroup_t)*numgroups);
|
grouplist = Hunk_Alloc(sizeof(galiasgroup_t)*numgroups);
|
||||||
for(;;)
|
for(surf = root;;)
|
||||||
{
|
{
|
||||||
root->groupofs = (char*)grouplist - (char*)root;
|
surf->groupofs = (char*)grouplist - (char*)surf;
|
||||||
root->groups = numgroups;
|
surf->groups = numgroups;
|
||||||
if (!root->nextsurf)
|
if (!surf->nextsurf)
|
||||||
break;
|
break;
|
||||||
root = (galiasinfo_t*)((char*)root + root->nextsurf);
|
surf = (galiasinfo_t*)((char*)surf + surf->nextsurf);
|
||||||
}
|
}
|
||||||
for (i = 0; i < numgroups; i++)
|
for (i = 0; i < numgroups; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue