From 6a2f46aac8dedfe651d7f60014c5a19b938618f3 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sat, 13 Oct 2007 19:08:38 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1352 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/entity.h | 2 +- source/src/md2.h | 2 ++ source/src/md3.h | 2 ++ source/src/vertmodel.h | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/src/entity.h b/source/src/entity.h index d68e574d..90ef46ba 100644 --- a/source/src/entity.h +++ b/source/src/entity.h @@ -121,7 +121,7 @@ struct dynent : physent // animated ent animstate prev[2], current[2]; // md2's need only [0], md3's need both for the lower&upper model int lastanimswitchtime[2]; void *lastmodel[2]; - int lastrendered = 0; + int lastrendered; void stopmoving() { diff --git a/source/src/md2.h b/source/src/md2.h index 6eab03d2..c4190c18 100644 --- a/source/src/md2.h +++ b/source/src/md2.h @@ -201,6 +201,8 @@ struct md2 : vertmodel vwepmdl->setskin(); vwepmdl->render(anim, varseed, speed, basetime, o, yaw, pitch, d, NULL, scale); } + + if(d) d->lastrendered = lastmillis; } void rendershadow(int anim, int varseed, float speed, int basetime, const vec &o, float yaw, model *vwepmdl) diff --git a/source/src/md3.h b/source/src/md3.h index 8300b0ee..0abcd4aa 100644 --- a/source/src/md3.h +++ b/source/src/md3.h @@ -176,6 +176,8 @@ struct md3 : vertmodel if(!cullface) glEnable(GL_CULL_FACE); else if(anim&ANIM_MIRROR) glCullFace(GL_FRONT); + + if(d) d->lastrendered = lastmillis; } void rendershadow(int anim, int varseed, float speed, int basetime, const vec &o, float yaw, model *vwepmdl) diff --git a/source/src/vertmodel.h b/source/src/vertmodel.h index ccc60994..0bf3ac73 100644 --- a/source/src/vertmodel.h +++ b/source/src/vertmodel.h @@ -292,7 +292,7 @@ struct vertmodel : model if(d && index<2) { - if(d->lastmodel[index]!=this || d->lastanimswitchtime[index]==-1) + if(d->lastmodel[index]!=this || d->lastanimswitchtime[index]==-1 || lastmillis-d->lastrendered>animationinterpolationtime) { d->current[index] = as; d->lastanimswitchtime[index] = lastmillis-animationinterpolationtime*2;