From ccefafd172a77c5f60f9c5ddb0f4a9299d1528bc Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 14 Feb 2025 23:24:58 +0100 Subject: [PATCH] load both encore and non encore tex --- src/hardware/hw_cache.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 7ac8aa631..d11a5c5e0 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -612,11 +612,20 @@ void HWR_PrecacheLevel(void) continue; if (side->toptexture >= 0 && side->toptexture < numtextures) - texturepresent[side->toptexture] = noencoremap ? 2 : 1; + { + texturepresent[side->toptexture] = 1; + texturepresent[side->toptexture] |= noencoremap ? 2 : 1; + } if (side->midtexture >= 0 && side->midtexture < numtextures) - texturepresent[side->midtexture] = noencoremap ? 2 : 1; + { + texturepresent[side->midtexture] = 1; + texturepresent[side->midtexture] |= noencoremap ? 2 : 1; + } if (side->bottomtexture >= 0 && side->bottomtexture < numtextures) - texturepresent[side->bottomtexture] = noencoremap ? 2 : 1; + { + texturepresent[side->bottomtexture] = 1; + texturepresent[side->bottomtexture] |= noencoremap ? 2 : 1; + } } } @@ -630,7 +639,11 @@ void HWR_PrecacheLevel(void) if (!texturepresent[i]) continue; - HWR_GetTexture(i, (texturepresent[i] == 2)); + if (texturepresent[j] & 1) + HWR_GetTexture(j, false); + + if (texturepresent[j] & 2) + HWR_GetTexture(j, true); } free(texturepresent);