From f96c9e90952da97da8994f076d8ea755d480f1d0 Mon Sep 17 00:00:00 2001 From: GenericHeroGuy Date: Sun, 25 May 2025 19:51:06 +0200 Subject: [PATCH] Forgot why this is necessary --- src/r_textures.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r_textures.c b/src/r_textures.c index 26ae8650d..1a191828f 100644 --- a/src/r_textures.c +++ b/src/r_textures.c @@ -574,6 +574,7 @@ UINT8 *R_GetFlatForTexture(size_t texnum) texpatch_t *patch = &texture->patches[0]; UINT16 wadnum = patch->wad; lumpnum_t lumpnum = patch->lump; + boolean doremap = W_NeedPaletteRemapPwad(wadnum, lumpnum, false); UINT8 *pdata = W_CacheLumpNumPwad(wadnum, lumpnum, PU_CACHE); size_t lumplength = W_LumpLengthPwad(wadnum, lumpnum); @@ -587,7 +588,7 @@ UINT8 *R_GetFlatForTexture(size_t texnum) memcpy(texture->flat, pdata, lumplength); } - if (W_NeedPaletteRemapPwad(wadnum, lumpnum, true)) + if (doremap) R_DoPaletteRemapFlat(texture->flat, lumplength); Z_SetUser(texture->flat, &texture->flat);