From c99f2c20b11122b9984ae5c25e2fcd620d8451eb 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 b68d3d05d..a5f559642 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -615,11 +615,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; + } } } @@ -633,7 +642,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);