diff --git a/polymer/build/src/mdsprite.c b/polymer/build/src/mdsprite.c index f6243975d..a361e2e17 100644 --- a/polymer/build/src/mdsprite.c +++ b/polymer/build/src/mdsprite.c @@ -1478,6 +1478,25 @@ static int md3draw(md3model *m, spritetype *tspr) f = m->interpol; g = 1-f; + if (m->interpol < 0 || m->interpol > 1 || + m->cframe < 0 || m->cframe >= m->numframes || + m->nframe < 0 || m->nframe >= m->numframes) + { + OSD_Printf("Model frame out of bounds!\n"); + if (m->interpol < 0) + m->interpol = 0; + if (m->interpol > 1) + m->interpol = 1; + if (m->cframe < 0) + m->cframe = 0; + if (m->cframe >= m->numframes) + m->cframe = m->numframes - 1; + if (m->nframe < 0) + m->nframe = 0; + if (m->nframe >= m->numframes) + m->nframe = m->numframes - 1; + } + if (m->head.flags == 1337) { // md2 diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index d7fc95815..636dbeb13 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -4628,6 +4628,7 @@ int EGS(int whatsect,int s_x,int s_y,int s_z,int s_pn,int s_s,int s_xr,int s_yr, else show2dsprite[i>>3] &= ~(1<<(i&7)); clearbufbyte(&spriteext[i], sizeof(spriteexttype), 0); + clearbufbyte(&spritesmooth[i], sizeof(spritesmoothtype), 0); /* if(s->sectnum < 0)