if (r->frame1 >= numframes)
{
- Con_DPrintf ("CL_LerpAnimation: no such frame %d\n", r->frame1);
+ Con_DPrintf("CL_LerpAnimation: no such frame %d\n", r->frame1);
r->frame1 = 0;
}
if (r->frame2 >= numframes)
{
- Con_DPrintf ("CL_LerpAnimation: no such frame %d\n", r->frame2);
+ Con_DPrintf("CL_LerpAnimation: no such frame %d\n", r->frame2);
r->frame2 = 0;
}
sub1 = (sub1 % scene->framecount);
sub2 = (sub2 % scene->framecount);
}
- else
- {
- sub1 = bound(0, sub1, (scene->framecount - 1));
- sub2 = bound(0, sub2, (scene->framecount - 1));
- }
- sub1 += scene->firstframe;
- sub2 += scene->firstframe;
+ sub1 = bound(0, sub1, (scene->framecount - 1)) + scene->firstframe;
+ sub2 = bound(0, sub2, (scene->framecount - 1)) + scene->firstframe;
f = sub1;
d = (1 - sublerp) * lerp;
#define FRAMEBLENDINSERT\
sub1 = (sub1 % scene->framecount);
sub2 = (sub2 % scene->framecount);
}
- else
- {
- sub1 = bound(0, sub1, (scene->framecount - 1));
- sub2 = bound(0, sub2, (scene->framecount - 1));
- }
- sub1 += scene->firstframe;
- sub2 += scene->firstframe;
+ sub1 = bound(0, sub1, (scene->framecount - 1)) + scene->firstframe;
+ sub2 = bound(0, sub2, (scene->framecount - 1)) + scene->firstframe;
f = sub1;
d = (1 - sublerp) * lerp;
FRAMEBLENDINSERT