X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=r_lerpanim.c;h=f736a11ccc31b3e2b96c9b208c43a9995ca76920;hb=bdb63282edaaa746a60ce4f9ddcdd914a4c4395f;hp=0a91e8133c25b1f0d9af446267c764a66065fcbb;hpb=50ad2c94eefa8226b5568d89859651bb7ee75c88;p=xonotic%2Fdarkplaces.git diff --git a/r_lerpanim.c b/r_lerpanim.c index 0a91e813..f736a11c 100644 --- a/r_lerpanim.c +++ b/r_lerpanim.c @@ -20,13 +20,13 @@ void R_LerpAnimation(entity_render_t *r) 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; } @@ -68,13 +68,8 @@ void R_LerpAnimation(entity_render_t *r) 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\ @@ -128,13 +123,8 @@ void R_LerpAnimation(entity_render_t *r) 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