check for realpatch here too
This commit is contained in:
1 parent
05354a3352
commit
201ead11ea
2 files changed
+10
-2
No files matched your search
@@ -384,8 +384,11 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *gltex, boolean noe
|
||||
for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
|
||||
{
|
||||
realpatch = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_CACHE);
|
||||
HWR_DrawTexturePatchInCache(&gltex->mipmap, blockwidth, blockheight, texture, patch, realpatch);
|
||||
Z_ChangeTag(realpatch, PU_HWRCACHE_UNLOCKED);
|
||||
if (realpatch != NULL)
|
||||
{
|
||||
HWR_DrawTexturePatchInCache(&gltex->mipmap, blockwidth, blockheight, texture, patch, realpatch);
|
||||
Z_ChangeTag(realpatch, PU_HWRCACHE_UNLOCKED);
|
||||
}
|
||||
}
|
||||
|
||||
//Hurdler: not efficient at all but I don't remember exactly how HWR_DrawPatchInCache works :(
|
||||
|
||||
@@ -282,6 +282,11 @@ static UINT8 *R_GenerateTexture(size_t texnum)
|
||||
for (i = 0, patch = texture->patches; i < texture->patchcount; i++, patch++)
|
||||
{
|
||||
realpatch = W_CacheLumpNumPwad(patch->wad, patch->lump, PU_LEVEL);
|
||||
|
||||
// Well, it's not valid...
|
||||
if (realpatch == NULL)
|
||||
continue;
|
||||
|
||||
x1 = patch->originx;
|
||||
x2 = x1 + SHORT(realpatch->width);
|
||||
|
||||
|
||||
Reference in new issue
Block a user