From: havoc Date: Thu, 2 Apr 2009 09:13:09 +0000 (+0000) Subject: fix severe animation bug with single-frame framegroups in zym models X-Git-Tag: xonotic-v0.1.0preview~1761 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a84ce82188b4067f8fbc397409e9c14e7ef96662;p=xonotic%2Fdarkplaces.git fix severe animation bug with single-frame framegroups in zym models slight tweak to framegroup interpolation in zym models (restored some epsilon checks) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8846 d7cf8633-e32d-0410-b094-e92efae38249 --- 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++) {