Nexuiz uses h_*.dpm models that are mostly vertex-less (there are 6 dummy ones)
and merely move bones in order to move around the first-person weapon.
This means that these models (or rather, their surface meshes) will be
considered "non-animated" by the rendering code, given their dummy vertices are
never moved by animations.
However, a function to build animation subframes lists from animation group
numbers - which is called by gettaginfo and similar functions that locate
attachment points - falsely looked at the isanimated flag of the surface mesh
to decide whether to really build the list of subframes or not - and this was
wrong, given that statically displayed models that do move tags/bones do exist!
This commit removes this use of the isanimated flag and treats models with
animated and non-animated surface mesh the same for purposes of animation frame
evaluation.
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12241
d7cf8633-e32d-0410-b094-
e92efae38249
Host_Error("Mod_IDSP_Load: %s has wrong version number (%i). Only %i (quake), %i (HalfLife), and %i (sprite32) supported",
loadmodel->name, version, SPRITE_VERSION, SPRITEHL_VERSION, SPRITE32_VERSION);
+ // TODO: Note that isanimated only means whether vertices change due to
+ // the animation. This may happen due to sprframe parameters changing.
+ // Mere texture chanegs OTOH shouldn't require isanimated to be 1.
loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || (loadmodel->animscenes && loadmodel->animscenes[0].framecount > 1);
}
loadmodel->radius = modelradius;
loadmodel->radius2 = modelradius * modelradius;
+ // TODO: Note that isanimated only means whether vertices change due to
+ // the animation. This may happen due to sprframe parameters changing.
+ // Mere texture chanegs OTOH shouldn't require isanimated to be 1.
loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || (loadmodel->animscenes && loadmodel->animscenes[0].framecount > 1);
}
memset(blend, 0, MAX_FRAMEBLENDS * sizeof(*blend));
- if (!model || !model->surfmesh.isanimated)
+ // rpolzer: Not testing isanimated here - a model might have
+ // "animations" that move no vertices (but only bones), thus rendering
+ // may assume it's not animated while processing can't.
+ if (!model)
{
blend[0].lerp = 1;
return;