Commit a447a3d8 by James R.

Merge branch 'rscache' into 'master'

Fix R_CacheRotSprite not working with PNG lumps See merge request !800
parents b92d66a5 1dc080e8
......@@ -1212,14 +1212,23 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
INT32 width, height, leftoffset;
fixed_t ca, sa;
lumpnum_t lump = sprframe->lumppat[rot];
size_t lumplength;
if (lump == LUMPERROR)
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
lumplength = W_LumpLength(lump);
#ifndef NO_PNG_LUMPS
if (R_IsLumpPNG((UINT8 *)patch, lumplength))
patch = R_PNGToPatch((UINT8 *)patch, lumplength, NULL);
// Because there's something wrong with SPR_DFLM, I guess
if (!R_CheckIfPatch(lump))
patch = (patch_t *)W_CacheLumpNum(lump, PU_STATIC);
width = patch->width;
height = patch->height;
leftoffset = patch->leftoffset;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment