Fix sprites with picnums >= MAXSPRITES not drawing in classic.

This was discovered because viewscreens (TILE_VIEWSCR) ceased being drawn
with the MAXTILES increase (reported by Hank, who also did the bisect).

git-svn-id: https://svn.eduke32.com/eduke32@2376 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-02-21 18:24:36 +00:00
parent cf9e0490a2
commit e18063beb8

View file

@ -5282,7 +5282,7 @@ static void drawsprite(int32_t snum)
spritenum = tspr->owner; spritenum = tspr->owner;
cstat = tspr->cstat; cstat = tspr->cstat;
if (tilenum < 0 || tilenum >= MAXSPRITES) return; if (tilenum < 0 || tilenum >= MAXTILES) return;
if ((cstat&48)==48) vtilenum = tilenum; // if the game wants voxels, it gets voxels if ((cstat&48)==48) vtilenum = tilenum; // if the game wants voxels, it gets voxels
else if ((cstat&48)!=48 && (usevoxels) && (tiletovox[tilenum] != -1) else if ((cstat&48)!=48 && (usevoxels) && (tiletovox[tilenum] != -1)