diff --git a/src/hardware/hw_cache.c b/src/hardware/hw_cache.c index 991032ac5..48af24ca9 100644 --- a/src/hardware/hw_cache.c +++ b/src/hardware/hw_cache.c @@ -699,6 +699,7 @@ static void HWR_PrecacheLevelTextures(void) static void HWR_PrecacheLevelSprites(void) { + GLPatch_t *spritepatch; char *spritepresent; size_t i, j, k; lumpnum_t lump; @@ -718,6 +719,8 @@ static void HWR_PrecacheLevelSprites(void) mo = (mobj_t *)th; // ogl is weird + // for some reason it does not want to preload sprites with colormaps + // so just save us the work if (mo->color || mo->colorized) continue; @@ -732,12 +735,16 @@ static void HWR_PrecacheLevelSprites(void) for (j = 0; j < sprites[i].numframes; j++) { sf = &sprites[i].spriteframes[j]; + for (k = 0; k < 8; k++) { // see R_InitSprites for more about lumppat,lumpid lump = sf->lumppat[k]; + spritepatch = (GLPatch_t *)W_CachePatchNum(lump, PU_CACHE); - HWR_GetMappedPatch((GLPatch_t *)W_CachePatchNum(lump, PU_CACHE), NULL); + // yes this may be NULL + if (spritepatch != NULL) + HWR_GetPatch(spritepatch); // no colormapped sprites for us } } }