diff --git a/source/src/protos.h b/source/src/protos.h index 92312d1d..ecef15c4 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -231,7 +231,7 @@ extern void cleansound(); extern void music(char *name); // rendermodel -extern void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, float z, float yaw, float pitch, float speed, int basetime = 0, dynent *d = NULL, char *vwepmdl = NULL, float scale = 1.0f); +extern void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, float z, float yaw, float pitch, float speed, int basetime = 0, playerent *d = NULL, char *vwepmdl = NULL, float scale = 1.0f); extern mapmodelinfo &getmminfo(int i); extern int findanim(const char *name); extern void loadskin(const char *dir, const char *altdir, Texture *&skin, model *m); diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 34e1ea26..26f31239 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -85,7 +85,7 @@ model *loadmodel(const char *name, int i) return m; }; -void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, float z, float yaw, float pitch, float speed, int basetime, dynent *d, char *vwepmdl, float scale) +void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, float z, float yaw, float pitch, float speed, int basetime, playerent *d, char *vwepmdl, float scale) { model *m = loadmodel(mdl); if(!m) return; @@ -117,7 +117,7 @@ void rendermodel(char *mdl, int anim, int tex, float rad, float x, float y, floa }; if(anim&ANIM_MIRROR) glCullFace(GL_BACK); - m->render(anim, (int)(size_t)d, speed, basetime, x, y, z, yaw, pitch, d, vwep, scale); + m->render(anim, (int)(size_t)d + (d ? d->lastaction : 0), speed, basetime, x, y, z, yaw, pitch, d, vwep, scale); if(anim&ANIM_MIRROR) glCullFace(GL_FRONT); };