Let the temporary vissprite be stack local

This commit is contained in:
Randy Heit 2016-04-17 20:59:08 -05:00
parent 66c4bc1fee
commit c5c032911c

View file

@ -1294,7 +1294,8 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
WORD flip; WORD flip;
FTexture* tex; FTexture* tex;
vissprite_t* vis; vissprite_t* vis;
static vissprite_t avis[NUMPSPRITES+1]; static vissprite_t avis[NUMPSPRITES];
vissprite_t tempvis;
bool noaccel; bool noaccel;
assert(pspnum >= 0 && pspnum < NUMPSPRITES); assert(pspnum >= 0 && pspnum < NUMPSPRITES);
@ -1338,7 +1339,7 @@ void R_DrawPSprite (pspdef_t* psp, int pspnum, AActor *owner, fixed_t sx, fixed_
return; return;
// store information in a vissprite // store information in a vissprite
vis = &avis[NUMPSPRITES]; vis = &tempvis;
vis->renderflags = owner->renderflags; vis->renderflags = owner->renderflags;
vis->floorclip = 0; vis->floorclip = 0;