]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
less warning spew about non-existent frames in a model (developer_extra
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 29 Oct 2011 07:09:52 +0000 (07:09 +0000)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 29 Oct 2011 17:55:43 +0000 (19:55 +0200)
is now checked) and also not warning about using a frame number on a
model with only one frame

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11485 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=c39c2ddce72e3b193a171eed6aaaaaf606135306

prvm_cmds.c

index 2ed1d378e49f71797059697b798060a8652130af..c2eb5b16646e630dfb400600ab9020cb6b8a20d7 100644 (file)
@@ -95,7 +95,7 @@ void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroup
 
        memset(blend, 0, MAX_FRAMEBLENDS * sizeof(*blend));
 
-       if (!model || !model->surfmesh.isanimated)
+       if (!model || !model->surfmesh.isanimated || model->numframes <= 1)
        {
                blend[0].lerp = 1;
                return;
@@ -108,7 +108,8 @@ void VM_FrameBlendFromFrameGroupBlend(frameblend_t *frameblend, const framegroup
                f = g->frame;
                if ((unsigned int)f >= (unsigned int)numframes)
                {
-                       Con_DPrintf("VM_FrameBlendFromFrameGroupBlend: no such frame %d in model %s\n", f, model->name);
+                       if (developer_extra.integer)
+                               Con_DPrintf("VM_FrameBlendFromFrameGroupBlend: no such frame %d in model %s\n", f, model->name);
                        f = 0;
                }
                d = lerp = g->lerp;