X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=r_lerpanim.c;h=271fc0547291e462d8fa057826620e669b3c4306;hb=8347f093098783cc7c57555b835a67ce5e637a2b;hp=f384d81af0eb39c67af64157fb3c565e70e413ed;hpb=9e10334c3d85c0ff3630fe015f40b5c5a227668a;p=xonotic%2Fdarkplaces.git diff --git a/r_lerpanim.c b/r_lerpanim.c index f384d81a..271fc054 100644 --- a/r_lerpanim.c +++ b/r_lerpanim.c @@ -58,6 +58,10 @@ void R_LerpAnimation(entity_render_t *r) f = (int) floor(sublerp); sublerp -= f; sub2 = f + 1; + if (sublerp < (1.0 / 65536.0f)) + sublerp = 0; + if (sublerp > (65535.0f / 65536.0f)) + sublerp = 1; if (nolerp) sublerp = 0; if (scene->loop) @@ -69,7 +73,7 @@ void R_LerpAnimation(entity_render_t *r) sub2 = bound(0, sub2, (scene->framecount - 1)) + scene->firstframe; d = sublerp * lerp; // two framelerps produced from one animation - if (f != sub2 && d > 0) + if (d > 0) { for (i = 0;i < MAX_FRAMEBLENDS;i++) {