Classic: don't attempt drawing sprites with (cstat&48) == 48 that aren't voxels.

Bang! One more invalid internals exposure squashed. Maybe one day we'll be able
to call EDuke32 "stable"...

Actually the offending sprite IS drawn as face sprite with shade 32 and xrepeat
and yrepeat 255 for the convenience of the CON coder who will have to debug it.

git-svn-id: https://svn.eduke32.com/eduke32@2744 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-06-07 17:37:57 +00:00
parent 169587b5b4
commit 2ddd6df14a

View file

@ -5395,6 +5395,7 @@ static void drawsprite(int32_t snum)
if ((cstat&48) == 0) if ((cstat&48) == 0)
{ {
draw_as_face_sprite:
if (yp <= (4<<8)) return; if (yp <= (4<<8)) return;
siz = divscale19(xdimenscale,yp); siz = divscale19(xdimenscale,yp);
@ -6201,6 +6202,12 @@ static void drawsprite(int32_t snum)
} }
*/ */
longptr = (int32_t *)voxoff[vtilenum][0]; longptr = (int32_t *)voxoff[vtilenum][0];
if (longptr == NULL)
{
globalshade = 32;
tspr->xrepeat = tspr->yrepeat = 255;
goto draw_as_face_sprite;
}
if (voxscale[vtilenum] == 65536) if (voxscale[vtilenum] == 65536)
{ {