]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug with iqm models by removing pose 0 optimization (as it
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 May 2011 09:08:29 +0000 (09:08 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 May 2011 09:08:29 +0000 (09:08 +0000)
represents the basepose in iqm, not the first pose)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11107 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 8722db4c23b04be18dd933133aaa3ed309a2a6df..7dba7729e0ec18a63ac3628dab40c0c62f72f319 100644 (file)
@@ -4554,7 +4554,7 @@ qboolean R_AnimCache_GetEntity(entity_render_t *ent, qboolean wantnormals, qbool
        else
        {
                // see if this ent is worth caching
-               if (!model || !model->Draw || !model->surfmesh.isanimated || !model->AnimateVertices || (ent->frameblend[0].lerp == 1 && ent->frameblend[0].subframe == 0 && !ent->skeleton))
+               if (!model || !model->Draw || !model->surfmesh.isanimated || !model->AnimateVertices)
                        return false;
                // get some memory for this entity and generate mesh data
                numvertices = model->surfmesh.num_vertices;
@@ -4844,6 +4844,17 @@ static void R_DrawModels(void)
                        continue;
                ent = r_refdef.scene.entities[i];
                r_refdef.stats.entities++;
+               /*
+               if (ent->model && !strncmp(ent->model->name, "models/proto_", 13))
+               {
+                       vec3_t f, l, u, o;
+                       Matrix4x4_ToVectors(&ent->matrix, f, l, u, o);
+                       Con_Printf("R_DrawModels\n");
+                       Con_Printf("model %s O %f %f %f F %f %f %f L %f %f %f U %f %f %f\n", ent->model->name, o[0], o[1], o[2], f[0], f[1], f[2], l[0], l[1], l[2], u[0], u[1], u[2]);
+                       Con_Printf("group: %i %f %i %f %i %f %i %f\n", ent->framegroupblend[0].frame, ent->framegroupblend[0].lerp, ent->framegroupblend[1].frame, ent->framegroupblend[1].lerp, ent->framegroupblend[2].frame, ent->framegroupblend[2].lerp, ent->framegroupblend[3].frame, ent->framegroupblend[3].lerp);
+                       Con_Printf("blend: %i %f %i %f %i %f %i %f %i %f %i %f %i %f %i %f\n", ent->frameblend[0].subframe, ent->frameblend[0].lerp, ent->frameblend[1].subframe, ent->frameblend[1].lerp, ent->frameblend[2].subframe, ent->frameblend[2].lerp, ent->frameblend[3].subframe, ent->frameblend[3].lerp, ent->frameblend[4].subframe, ent->frameblend[4].lerp, ent->frameblend[5].subframe, ent->frameblend[5].lerp, ent->frameblend[6].subframe, ent->frameblend[6].lerp, ent->frameblend[7].subframe, ent->frameblend[7].lerp);
+               }
+               */
                if (ent->model && ent->model->Draw != NULL)
                        ent->model->Draw(ent);
                else
@@ -7895,7 +7906,7 @@ void RSurf_ActiveModelEntity(const entity_render_t *ent, qboolean wantnormals, q
                rsurface.basepolygonfactor += r_polygonoffset_submodel_factor.value;
                rsurface.basepolygonoffset += r_polygonoffset_submodel_offset.value;
        }
-       if (model->surfmesh.isanimated && model->AnimateVertices && (rsurface.frameblend[0].lerp != 1 || rsurface.frameblend[0].subframe != 0))
+       if (model->surfmesh.isanimated && model->AnimateVertices)
        {
                if (ent->animcache_vertex3f)
                {