From 764d427c5ca3d15a9d85d38f94aa0ddc85f8677d Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 8 Apr 2011 16:10:44 +0000 Subject: [PATCH] when loading q1bsp textures, do not allow q3 shader loading to overwrite default parameters git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11036 d7cf8633-e32d-0410-b094-e92efae38249 --- model_brush.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model_brush.c b/model_brush.c index 0a3a944c..08040c79 100644 --- a/model_brush.c +++ b/model_brush.c @@ -1588,6 +1588,7 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l) skinframe_t *skinframe; miptex_t *dmiptex; texture_t *tx, *tx2, *anims[10], *altanims[10]; + texture_t backuptex; dmiptexlump_t *m; unsigned char *data, *mtdata; const char *s; @@ -1722,8 +1723,11 @@ static void Mod_Q1BSP_LoadTextures(lump_t *l) if (name[j] >= 'A' && name[j] <= 'Z') name[j] += 'a' - 'A'; + // LordHavoc: backup the texture_t because q3 shader loading overwrites it + backuptex = loadmodel->data_textures[i]; if (dmiptex->name[0] && Mod_LoadTextureFromQ3Shader(loadmodel->data_textures + i, name, false, false, 0)) continue; + loadmodel->data_textures[i] = backuptex; tx = loadmodel->data_textures + i; strlcpy(tx->name, name, sizeof(tx->name)); -- 2.39.2