iqm fixes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3936 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1cd1453a42
commit
4d75061dbc
1 changed files with 14 additions and 1 deletions
|
@ -1519,7 +1519,15 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, galiasinfo_t *inf, int surfnum, ent
|
|||
|
||||
#ifdef SKELETALMODELS
|
||||
meshcache.usebonepose = NULL;
|
||||
if (inf->numbones)
|
||||
if (inf->ofs_skel_xyz && !inf->ofs_skel_weight)
|
||||
{
|
||||
meshcache.usebonepose = false;
|
||||
mesh->xyz_array = (vecV_t*)((char*)inf + inf->ofs_skel_xyz);
|
||||
mesh->normals_array = (vec3_t*)((char*)inf + inf->ofs_skel_norm);
|
||||
mesh->snormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_svect);
|
||||
mesh->tnormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_tvect);
|
||||
}
|
||||
else if (inf->numbones)
|
||||
{
|
||||
meshcache.usebonepose = Alias_GetBonePositions(inf, &e->framestate, meshcache.bonepose, MAX_BONES, true);
|
||||
|
||||
|
@ -5948,6 +5956,7 @@ qboolean Mod_ParseIQMAnim(char *buffer, galiasinfo_t *prototype, void**poseofs,
|
|||
|
||||
qboolean Mod_LoadInterQuakeModel(model_t *mod, void *buffer)
|
||||
{
|
||||
int i;
|
||||
unsigned int hunkstart, hunkend, hunktotal;
|
||||
galiasinfo_t *root;
|
||||
struct iqmheader *h = (struct iqmheader *)buffer;
|
||||
|
@ -5963,6 +5972,10 @@ qboolean Mod_LoadInterQuakeModel(model_t *mod, void *buffer)
|
|||
|
||||
mod->flags = h->flags;
|
||||
|
||||
ClearBounds(mod->mins, mod->maxs);
|
||||
for (i = 0; i < root->numverts; i++)
|
||||
AddPointToBounds((float*)((char*)root + root->ofs_skel_xyz + i*sizeof(vecV_t)), mod->mins, mod->maxs);
|
||||
|
||||
Mod_ClampModelSize(mod);
|
||||
|
||||
Hunk_Alloc(0);
|
||||
|
|
Loading…
Reference in a new issue