From 2ddd6df14a70937f9e36634920c7d89e6853629e Mon Sep 17 00:00:00 2001 From: helixhorned Date: Thu, 7 Jun 2012 17:37:57 +0000 Subject: [PATCH] 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 --- polymer/eduke32/build/src/engine.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index cb9fe1440..ac22faacb 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -5395,6 +5395,7 @@ static void drawsprite(int32_t snum) if ((cstat&48) == 0) { +draw_as_face_sprite: if (yp <= (4<<8)) return; siz = divscale19(xdimenscale,yp); @@ -6201,6 +6202,12 @@ static void drawsprite(int32_t snum) } */ 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) {