From 983974821c052d3562bcd7c2dfd8caf1dbf72164 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 11 May 2025 00:33:39 +0200 Subject: [PATCH] make this check like vanilla did --- src/hardware/hw_md2.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index de78808e6..418e7340a 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -1060,7 +1060,6 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendgpatch, INT32 sk { // mostly copied from HWR_GetMappedPatch, hence the similarities and comment GLPatch_t *glPatch = patch->hardware; - GLPatch_t *glBlendPatch = NULL; GLMipmap_t *glMipmap, *newMipmap; @@ -1071,14 +1070,6 @@ static void HWR_GetBlendedTexture(patch_t *patch, patch_t *blendgpatch, INT32 sk return; } - if ((blendgpatch && (glBlendPatch = blendgpatch->hardware) && glBlendPatch->mipmap->format) - && (patch->width != blendgpatch->width || patch->height != blendgpatch->height)) - { - // Blend image exists, but it's bad. - GL_SetTexture(glPatch->mipmap); - return; - } - // search for the Mipmap // skip the first (no colormap translated) for (glMipmap = glPatch->mipmap; glMipmap->nextcolormap; ) @@ -1330,7 +1321,9 @@ void HWR_DrawMD2(gl_vissprite_t *spr) if (gpatch && hwrPatch && hwrPatch->mipmap->format) // else if meant that if a texture couldn't be loaded, it would just end up using something else's texture { - if ((skincolors_t)spr->mobj->color != SKINCOLOR_NONE) + if ((skincolors_t)spr->mobj->color != SKINCOLOR_NONE && + blendgpatch && hwrBlendPatch->mipmap->format + && gpatch->width == blendgpatch->width && gpatch->height == blendgpatch->height) { INT32 tcskinnum = TC_DEFAULT; if ((spr->mobj->flags & MF_BOSS) && (spr->mobj->flags2 & MF2_FRET) && (leveltime & 1)) // Bosses "flash"